As for the settled resident: he is one who is in his home town, whether it is his original home town or a place in which he later settled.
For the Eid prayer to be valid, it is stipulated that it be offered by a settled community. Accordingly, if Eid comes while we are travelling, it is not prescribed for us to perform the Eid prayer.
The evidence for this is that the Prophet ﷺ established the Eid prayer only in Madinah. He travelled to Makkah in the year of the Conquest and remained there until the beginning of Shawwal. Eid came while he was there, yet it has not been reported that he ﷺ performed the Eid prayer. During the Farewell Pilgrimage, Eid came while he was in Mina, and he did not establish the Eid prayer because he was travelling—just as he did not establish the Friday prayer at Arafah because he was travelling.
Thus, the Eid prayer is not prescribed for travellers. This is clear, for this was the Prophet’s ﷺ guidance.
As for temporary residents, the same applies according to the madhhab, since they are not among those required to establish the Friday prayer and therefore are not among those required to establish the Eid prayer.
If, for example, a group of two hundred people were in a non-Muslim country, having come there for study rather than to settle permanently, and Eid came upon them, they would not establish the Eid prayer, because they are not settled residents. However, this view warrants further consideration. For this reason, people today act contrary to it: those who reside for study in non-Muslim lands where the Eid prayer is not established do establish the Friday prayer and the Eid prayer. They hold that, were they to neglect this, it would invite criticism that they do not uphold the rites of their religion on their proper occasions.