Question:

I've heard it said that after the Jews were expelled from Spain in 1492, the rabbis banned any Jew from living in Spain—punishable by excommunication. Is this true?

Answer:

Recent halachic authorities have discussed this question extensively.1

The conclusion they reach is virtually unanimous: there is no written record indicating that such a ban ever existed. Thus, there are no verifiable grounds for such a supposition, neither in halachic texts nor historical works from that period.

And even if such a ban did exist, it is more than likely, they say, that the ban applied only to Jews of that generation, who had lived in Spain, forbidding them from returning, should the opportunity have arisen.

Rabbi Eliezer Danzinger for Chabad.org