I am afraid that your examples are awkward, but not because of the usage of "exact". Lets first look at them without that word:
- What an input space is?
- What is an input space?
Of these, only the second ("What is an input space?") is natural. The first has an odd placement of the verb form "is", and is not likely to lead to a natural usage with 'exactly" added.
So now let's consider how to add "exactly".
- What is an input space, exactly?
- Exactly what is an input space?
- What, exactly, is an input space?
Any of these would be acceptable in my opinion, but the third I think is much the best. It emphasizes "exactly", and makes it clear that it modifies "what". I can't specify a clear rule or guideline with this result, however.