I grew up in the US but have lived in Barcelona for several years now.
I don't believe that racism is worse in the US than Spain; in fact much the opposite. I live in a mixed-income neighborhood in Barcelona and see far more casual discrimination against low-income immigrants and the local Roma subculture here than I've seen in any major US city. The US has historically had really bad racial policies and there are definitely still parts of the country with a backwards view on race and class, but most of the US (and certainly the parts of the country where a high-skilled immigrant might move to) just isn't like that anymore. I can't speak to the rest of Europe, but Barcelona at least seems behind here.
That said, I do agree there's a lot more inequality in the US than Spain. (It seems to me though that's more about the middle and upper class in the US being much richer—the poor in Spain don't seem to have an easier life than the poor in the US.)