Out of curiosity, which are these countries?
I'm sure lots of countries have similar rules.
They have to demonstrate that they can't find a citizen to do the job etc...?
But: - tech salaries aren't US competitive - people often speak Danish (sometimes it's a requirement)
And while you'll probably do fine with English in Denmark in general. Long term you would need to learn the language. And to be fair, it's a useless language, there is only 5M speakers, why would anyone spend time learning that? :)
And yes, you would experience racism too. Just because it's a borderline social-libertarian paradise doesn't mean all the people are angels.