There are plenty of people who are in desperate situations like your first example but they still don't repent of their sins and cry out to God for mercy. Look at the following:
Rev 16:8 And the fourth angel poured out his vial upon the sun; and power was given unto him to scorch men with fire. 9And men were scorched with great heat, and blasphemed the name of God, which hath power over these plagues: and they repented not to give him glory. 10And the fifth angel poured out his vial upon the seat of the beast; and his kingdom was full of darkness; and they gnawed their tongues for pain, 11And blasphemed the God of heaven because of their pains and their sores, and repented not of their deeds.
So, being in a desperate situation does not guarantee that a person will respond by crying out to God for mercy.
Regarding your second example, there are plenty of people who have everything they need in a material sense and don't have many problems in their lives but they can still feel empty inside and feel like something is missing in their lives and realize that all their material wealth is temporary and cannot give them eternal life. One's circumstances do not necessarily dictate whether or not they are willing to ask God for mercy and surrender to Him.