Spain has the Beckham law - https://en.wikipedia.org/wiki/Beckham_law - though it might not survive much longer.
Sweden has a similar policy but you need to earn over ~120,000 euros: https://www.forskarskattenamnden.se/forutsattningarforskatte...
I was really close to moving to NL to take advantage of that (vs. the insane taxes in Sweden) but unfortunately at the time I got the offer they were still in full lockdown restrictions.
Some people in my country fail to realize that in this case the Dutch state did not invest in the education of these people. I suspect the math works out.
Another way to look at it would be that these expats contribute to our economy and society without having cost us money in preparation (schooling etc.) So I think it's a win-win.
There is a low flat tax rate (30% iirc) for some years (was 5 when I last checked) if you're working in an "in-demand" sector, and tech is one of those sectors.
This is somewhat controversial from what I understand, not all of the Dutch like it, and I understand why: it's not really very fair to give foreigners a tax break and not your own people. But it's interesting nonetheless.