I make the case that solving apparently lose-lose dilemmas in a creative way, involves the skill we call wisdom: Wisdom and John Vervaeke's awakening from the meaning crises?
There are other options. The man could set up a health insurance system. Campaign for political change. Undertake activities to get publicity for his fundraising. We don't have to accept the apparent binary choices we are presented with. There's also every chance the man won't get the drug, and will be in prison for burglary while his wife dies..
You could idealise the case as a trolley problem, to remove the alternatives. You are stood at a switching lever, the trolley is heading towards your wife, but if you pull the lever it will divert to a track with the pharmacists window on it which being hit will cause the pharmacist to pay a slightly higher theft insurance premium. An overwhelming majority I think would consider it immoral to allow your wife to die out of concern for the pharmacists property.
We have hierarchies of moral values, so most moral systems approve of lying to a murderer to save someone who would otherwise become a victim (Kant famously didn't accept this). So it is considered moral by most people, to violate a rule they normally hold, in service of a higher moral duty. For example, we generally accept murdering people in war, to protect people from being murdered unjustly (wars generally begin with a conflict in views about what is just).
Generally in practical ethics a life is given a large financial value (see 'Quality-adjusted life year'), not unlimited because a given use of money might save more lives spent one way than another. Most of the world and nearly every developed country except the USA, makes provision for people to recieve life-saving when they need it, with how it is paid for worked out afterwards. There is arguably a moral contradiction in claiming lives have a high value, and allowing people to die because they could not afford health insurance, and can't pay upfront for care. In the USA this is widely considered a moral failing of the person who is poor, rather than a practical issue to be solved in the interests of the community as a whole. This highlights how culture can be at odds with the claimed morality of individuals in it.