What is the fate of a non muslim homeless person who lived a very miserable life on this earth? If he received the message of islam and rejected it will he still be doomed to hell for eternity even though he lived a life fully of misery and hardship and received nothing good from the earthly life?

Ustadh AbdulAziz al-Haqqan
I don't believe there is such a thing, as usually Allah has given them health, time, guidance, and many other things and they might have chosen the wrong choices.