All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and messenger.
Taking part in Iftaar meals provided in the mosque has no specific conditions except what may be set by the donors. Should they specify those meals for the poor, regular worshippers in the mosque, those who have no abode or set any other defining feature for those who may benefit from the meals, then those who are not included in the specified categories may not eat from them. There are proofs in the religious texts indicating that the conditions set by a donor or giver of endowment should be observed, unless they go against the Sharee‘ah.
If the donors of these meals do not set any conditions, dedicating them generally for fasting Muslims, then any fasting person may eat from them, even if he has a good salary. However, it is more proper for a well-off Muslim not to disturb the needy in this area.
Allaah Knows best.