The market tends to fail when it's strangled by regulations (which pleases the large incumbents, whose necks are much thicker than their competitors). For any apparent market failure, try translating your complaint into a business plan, and see what obstacles you hit. "These drugs are way too expensive. Why can't I make a profit by making the drug and selling it for a lower price?" Answer: the patent system forbids it.
And for medical conditions that don't yet have drugs developed: "Why can't I make a profit by investing some reasonable amount of money to develop a drug?" https://en.wikipedia.org/wiki/Cost_of_drug_development puts the average cost in the billions of dollars. How much of that is due to intrinsic difficulty, and how much is artificially imposed?
I'm not sure if life saving medicine should or even can be understood through economic equilibrium. This is ultimately a question of ethics, politics and sheer survival. This isn't a market in the first place and it doesn't help that we pretend it is.
Everything is a market. Someone has to produce a finite supply for some cost. There is some demand for the medicine. Suppliers can be incentivized to produce by demand through price.
Look up the percentage of all drugs that were invented in the United States. Socialized medicine is subsidized by capitalist innovation overseas. There are so many problems with the US system, but they have more to do with regulatory capture (including difficulty of FDA approval + difficulty of becoming a doctor) and price transparency than anything else.
Sit tight and assess! This is like reading a propaganda pamphlet with the inevitable very long term "it may work, we'll have to wait and see in a decade or two, but until then at least our profits are not affected"-solutions.