I can buy Kirk questioning their presence in his 23rd century (where vision problems don't require mechanical eyewear).
I can buy the fact that eyeglasses are a rare sight in everyday life in Kirk's time.
But I don't buy Kirk needing McCoy to explain how they function. Certainly Kirk is vaguely familiar with photos of people from history, and there are millions of such photos of people wearing eyeglasses. Kirk should know what those things are, how they were worn. It shouldn't be a mindboggler for Kirk.
Remember, this was from an early draft of the script written before the characters as we know them were well established. Sure, the Kirk we
know today is a history buff and knows what glasses were, but the Kirk Carey Wilber knew when he wrote the draft was still much more vaguely defined.
And as Harvey
suggests, there are a lot of things in first-draft scripts that don't work or don't make sense, which is why they're called "first-draft" instead of "only-draft."