All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Basically, migration from Muslim countries to non-Muslim countries is forbidden in the Sharee’ah. But, it is allowed in some exceptional cases when a person is compelled to migrate there because he does not have any other choice. For instance, if one fears for his soul and does not find any Muslim country where he can take shelter, or similar situations, it is permitted for him to migrate to a non-Muslim country. This rule is for the one who wants to settle there permanently but the same rule applies to the one who intends to stay there temporarily. Staying there even for a short period is not permissible except for a valid reason such as to get treatment, or to get some knowledge not found in Muslim countries, or to preach Islam, or to teach Islamic Sharee’ah to the Muslims who live there, etc.
But, going there only for a material purpose is not permissible since there is a high risk for the religion of the Muslim and his worldly life, as it is well known for every wise person.
As for the earnings of the Muslims in those countries they are lawful if one earns them through working in legal field. If one indulges in selling unlawful things, such as selling pork, alcohol, dead animals, etc. then the earnings are unlawful.
Therefore, he should get rid of those unlawful earnings by spending them for the benefit of Muslims such as establishing hospitals, etc.
Allah knows best.