IIRC, “Spain”, like “Germany”, was a geographic name long before it identified a particular polity.
In any case it's a geographic name coextensive with a modern polity now, and a modern speaker using it to identify a geographic location even for events that predate the modern polity is normal and clear.