Unfair in which way? Generally these people bring cash and education and support the development of local infrastructure. Many such countries actually offer specific retirement or resettlement visas to attract such migration.
We're talking about an aging population. There are a lot of costs associated with that.
In developing countries you are generally dealing with a user pays medical system. So they don't care if you require extensive medical care as you pay for it.