"but skin pigment is caused by latitude and sun exposure"
well...
if you were to take sequential samples of italians over many thousands of years, you may find that they have a tendency towards a browner skin colour, as that phenotype repeatedly wins in that latitude.
but, if you were born in modern day germany, and your ancestors were from russia, and you migrate south to italy in a very large group of other similar looking people, you're bringing in dna that adapted to a very different climate, and it's going to take quite a while for that to get absorbed.
it works the other way, too - if you take darker skinned people and plonk them on the booted peninsula, their descendants may lighten up
eventually, if they're lucky, but it's going to take quite a long time.
italians and spaniards seem to be roughly about where they ought to be, in terms of pigmentation, relative to other people at the same latitude, at this time. but, i believe the last major waves of migration to the peninsula were vikings and arabs, both pushing 1000 years ago, at this point.
immediately before the roman period, there would have been a large scale migration of very light-skinned people from over the alps, and that migration would be responsible for what we call
the roman republic. when rome fell apart, you had germans from the north and arabs from the south meeting each other at that latitude, and the result would have been an infusion of darker skin, which has actually since lightened up - which is why it is both true that italians from the classical period look whiter than they do today
and south italians from the dark ages look darker than they do, today.
if you look at a map more closely, you see this kind of thing all over the place, even with indigenous groups. people in the area north of china look more like people to the south of china than the chinese, themselves, because that was the direction of that migration. if you check back in a thousand years, that might change, but it takes some time to adjust....
likewise, european-americans are going to end up with the same skin tone as native americans, eventually. but, we're a few hundred years in, so far, and still waiting.
so, you need to be careful with that - the curve tends to a limit over time, but it's always going to be short-term migration that is dominant, overall.