Wow, I am refreshed and challenged by your unique point of view!
Current Spaniards expelled the Arabs from Spain in 1492.
Before that, the Arabs invaded an conquered Spain in the 8th Century.
Even before that, the Visigoths, Suebi, Vandals and Alans came into the picture at the beginning of the 5th Century. The Visigothic Kingdom conquered all of Hispania and ruled it until the early 8th century.
Even before that, between 236BC and 408AD, Spain was invaded by Carthaginians, Romans, Barbarians....
And before that, there were Iberians, Celtiberians, Tartessians, Lusitanians, and Vascones;and trading settlements of Phoenicians, Carthaginians, and Greeks.
And if we go back to the bronze age ..... Well, I think I better stop here.
With this new information to you, who would you say is entitled to Spanish sovereignty based on UN Resolution 242?