We have seen many reports of these "Golden Visa" programs over the years, where people buy an expensive property and they get to live in that country.
Spain was one of those - no more. I report on the elimination of the plan in the Spain Forum https://community.ricksteves.com/travel-forum/spain/no-more-golden-visas-in-spain