This entire region was an integral part of the Roman Empire at the beginning of the study period. It was a source of slaves, soldiers, merchants, and administrators who could be found throughout the empire and the recipient of similar people from elsewhere in the empire. So, if your ancestors lived here in 500 CE, their ancestors could easily have been from anywhere in the Roman Empire in 1 CE.
Fifth Century Germanic migrations: During the collapse of the Roman Empire, a confusing number of nations used this region as a wrestling mat or passed through en masse. Only one really had a significant effect that we need to account for: The Visigoths (AKA West Goths) This distinct Germanic nation originated in what is now Southern Sweden (maybe the Baltic Island of Gotland) and, beginning in the first century, began a long migration that took them through Poland, the Ukraine, the Southern Balkans, Italy, France, and finally to Iberia, which they ruled for two centuries. If your ancestors were Christians in Iberia in 500 CE, then their ancestors might also have lived anywhere along the track of the Gothic migration, all the way back to Sweden, in 1 CE.
711 CE: The Muslim Umma quickly absorbed most of Iberia after Tariq ibn Ziyad's daring conquest in 711. Tariq's army and those who followed later were in interesting mixture. Most were Berber natives of "the Maghrib" (modern Morocco, Mauretania, northern Algeria, and Tunisia.) Some were Arabs. The Arabs were newcomers to North Africa, having recently taken it over from an upper class from a Germanic nation, the Vandals. (The Vandals followed roughly the same route as the Goths, but instead of settling down in Spain, kept going into North Africa.) Though there was little intermarriage between Muslims and Christians in Islamic Spain, many Spanish Muslims converted to Christianity or otherwise "passed" after the Christian reconquest. Also there would have been the inevitable sneaky gene transfers. If your ancestors lived in Iberia in 1000 CE, then their ancestors possibly also lived in North Africa and the Arabian Peninsula in 500 CE.
A special case. By 1 CE, Iberia already had a large Jewish population. Iberian Jews were badly mistreated by Christian authorities, with the result that when the Muslim armies moved in, the Jews were only too happy to help them. In Islamic Spain, Jews reached the highest social positions and levels of authority that they would achieve outside of Judea prior to the enlightenment. It's hard to imagine that there wasn't a decent amount of gene flow between Spanish Jews and Muslims during this time. So, if you are of Sephardic Jewish descent, consider the possibility that you have Spanish Muslim ancestors. After the reconquest in 1492 CE, the Jews were expelled from Spain. Many converted to Christianity and/or went underground. If your ancestors were Spanish/Portuguese Christians or New World Hispanics in 1800 CE, and your family preserves folk customs that resemble Jewish observances such as dietary law, it is highly likely that some of their ancestors might have been Jews in 1490 CE.
Starting in the late 15th century, the Portuguese instituted the trans-Atlantic slave trade and later added an Indian-ocean slave trade. Slaves embarked on Portuguese ships from coastal West Africa between Senegal and Nigeria, from Angola, and from the nations of East Africa from Mozambique to Kenya. Some of these people ended up in Portugal. If your ancestors lived in Iberia in 1800 and had evidence of African ancestry, some of their ancestors were probably in the above listed regions of Africa in 1490.