In this context, the difference really depends on the availability of a chair to be loaned out, allowed to be borrowed, given away: in short, dispensed with. Any chair that meets that criterion is a spare chair, whether it's an extra chair or not.
An extra chair is one that is not in use. You can consider it one more than is necessary or required, and as a "left over" chair.
A classroom with 10 students and 11 chairs has an extra chair; call it Room 1. A classroom with 10 students and 15 chairs has five extra chairs; call it Room 5.
Now someone can go to either classroom and ask to borrow one of the extra chairs. There is no problem with that. So the question
I wonder if there is an extra chair I could borrow.
is valid and doesn't go against the meaning of what an extra chair is. And it doesn't violate the use, semantics or grammaticality of English.
But you basically need the phrase [that] I could borrow, because extra does not include that concept as intrinsic to its meaning.
Now before we talk about the adjective spare chair, let's bring up a definition for the verb to spare. There are many meanings, some of them seemingly contradictory and/or near antonyms (the verb's been in use since Old English). But one that is common is
8a. To dispense with from one's stock or supply, or from a number, quantity, etc.; to part with, to give or grant, lend, etc., to another or others, especially [but not necessarily] without inconvenience or loss to oneself; to do without.
(Oxford English Dictionary)
So, a spare chair is a chair that can be spared. Or it is a chair that one can "dispense with...blah blah blah, that whole definition above"
In fact the OED does define the adjective spare using the verb spare:
2a. That can be spared, dispensed with, or given away, as being in excess of actual requirements; superfluous.
Now, a spare chair is not the same as an extra chair. In fact, a spare chair could be not an extra chair. Let me restate that: A spare chair can actually be a chair that is in use and thus not "extra".
Let's look into Room 1J:
There are 10 chairs and and 10 students and all 10 chairs are occupied.
Someone knocks at the door and asks:
I wonder if there is a extra chair I could borrow.
Clearly not, as all ten chairs are in use. There are no leftover chairs.
But if the enquiry is
I wonder if there is a spare chair I could borrow.
Aha! this is different. The teacher can say:
Well as you can see, we don't have any extra chairs, as they're all in use. But I'm sure Johnny wouldn't mind standing up the rest of today and you can borrow his chair as long as you bring it back tomorrow.
This chair is a spare chair.
Note: One could argue that the chair that Johnny has vacated is now "extra," because it's no longer being used by Johnny, but actually it's still in regular use. In fact, Johnny had to put a chair deposit of $100 to reserve the chair for the semester, and he paid another $50 for an engraved name plate Johnny's Chair, which is attached to the chair. So, as far as the classroom goes, it's not really an extra chair. But it has become a spare chair that may be borrowed for the rest of the day.
To illustrate the difference between 'extra' and 'spare', let's ask a different question.
Let's go back into Room 5 (the one with 10 students, and with 15 chairs, stacked in the back that are collecting dust because no one ever uses them).
If you ask
How many extra chairs are there?
This means How many chairs not in use; that is, that are more than necessary and thus leftover do you have?
The teacher will answer 5.
If you ask
How many spare chairs are there?
The teacher might look quizzical and ask
How many do you need?
So an extra chair is a "leftover" chair, a chair not in regular use.
A spare chair is any chair that can be dispensed with–even if it's currently in use.
A last illustration:
A panhandler stands on a busy sidewalk and has his hand out and he says to passers-by:
Extra dollar?
His request is not that idiomatic.
If he says:
Spare dollar?
it's clear he's asking Dollar that you can dispense with?