Ibnul Qayyim (rahimahullah) said, Shaykhul Islam ibn Taymiyyah (rahimahullah) was asked about this issue, and he said,
“Many have disagreed regarding which is better between the wealthy grateful person and the patient poor person. So, one group of scholars and devout worshippers held one was better and another group of scholars and devout worshippers held the other position was stronger. Both positions have been reported from Imam Ahmad. As for the companions and the taabi’een it is not narrated from a single one of them that they believed one group was better than the other.
Verily, a third group said neither has any virtue over the other, except due to Taqwa, so whoever has the strongest Eemaan and Taqwa then he is better, and if (two people) were equal in Eeman and Taqwa then they are likewise equal in virtue. This is the most correct position, because the texts of the Quran and Sunnah give preference to Eemaan and Taqwa.
إِنْ يَكُنْ غَنِيًّا أَوْ فَقِيرًا فَاللَّهُ أَوْلَى بِهِمَا
Whether one is rich or poor, Allah is more worthy of both. (An-Nisaa:135)
Indeed, from the prophets and the early generations were wealthy people who were better than most of the poor, there was also poor from the prophets and early generation who were better than most of the wealthy. Those who are most complete (in this affair) are those who fulfil both, they are patient and grateful, just as our Prophet (sallallaahu alaihi wa salam) was, and Abu Bakr and Umar were (Allah be pleased with them both).
It is possible however, that for some people poverty is more beneficial than wealthiness, just as good health is better for some and ill health is better for others (in terms of their Eemaan, Taqwa and connection with Allah).
As has been reported that the Prophet (1) (sallallaahu alaihi wa salam) reported from his Lord,
Indeed from my servants are those who only wealthiness is suitable, if i made him poor that would corrupt him, indeed from my servants are those who only poverty is suitable, if i made him rich that would corrupt him, indeed from my servants are those who only good health is suitable, if i made him ill that would corrupt him, indeed from my servants are those who only ill health is suitable, if i made him healthy that would corrupt him, indeed with my slaves I am the Well-Aware, the All-Seer (of things that benefit them) (2)”
Slightly paraphrased from Ibnul Qayyim’s ‘Iddatus Saabireen pg.216
(1) Shaykh al-Albaani declared the hadith da’eef jiddan in Silsilah Al-Ahadeeth Ad-Da’eefah hadith 1775
In a recording Shaykh Al-Albaani comments, “this hadeeth is not authentic however it has actually been observed that for some people wealth is suitable and for some poverty is suitable.”
Shaykh Bin Baz (rahimahullah) said in a fatwa, “the meaning is correct.”
وَلَوْ بَسَطَ اللَّهُ الرِّزْقَ لِعِبَادِهِ لَبَغَوْا فِي الْأَرْضِ وَلَكِنْ يُنَزِّلُ بِقَدَرٍ مَا يَشَاءُ إِنَّهُ بِعِبَادِهِ خَبِيرٌ بَصِيرٌ
And if Allah were to enlarge the provision for His slaves, they would surely rebel in the earth, but He sends down by measure as He wills. Verily! He is in respect of His slaves, the Well-Aware, the All-Seer (of things that benefit them). (Ash-Shoora: 27)