Great question Gabrielle!
In this sentence, "Stadtplan" is actually the direct object, not the subject. The structure of the sentence "Gibt es hier einen Stadtplan?" is a bit tricky because of how German word order works. The verb "gibt" (a form of "geben," meaning "to give" or "to exist" in this context) requires the use of the accusative case for the object that is being "given" or that "exists"—in this case, "einen Stadtplan" (a city map).
The subject of this sentence is implied rather than explicitly stated. The phrase "gibt es" is often used to mean "there is" or "is there," and "es" (it) functions almost like a placeholder subject. Because "Stadtplan" is what you’re asking about, it is treated as the direct object, which is why it takes the accusative form "einen" instead of the nominative "ein."
I hope this clears up the confusion! Let me know if you have any further questions.