The word ever means "at any time [during the explicit or implicit time-frame in question]". When there is a restriction upon the time-frame as there is here:
When you were in college, did you ever oversleep and miss an exam?
then ever means "at any time during your college days". Where there is no such restriction, ever means "at any time".
The tense of the question determines the scope of ever.
If the question asks about the future, ever means "at any time in the future":
Will you ever go to Mars?
If the tense is past, the scope of ever is the past:
Did you ever mail that payment? I hope you didn't forget.
The present perfect sets its scope to "at any time in the past or at the present time".
Have you ever wished you were someplace else?
-- Yes. I wish I was someplace else right now.
Other than now?
-- Yes. I have wished I was someplace else on many occasions.
The question as posed includes the present moment. The first answer uses the present, "I wish". The second question, "Other than now?" asks about such a wish in the past. But the reply still uses the present perfect because the speaker is in effect saying "I am a person whose life experience up until the present moment includes instances of wishing I was someplace else".