I don't think that's unique to capitalism. The Soviets were building spacecraft and nuclear weapons while people went without food.
Curing an extremely rare disease is valuable, we all value human life. But say there are tens of thousands of uncured diseases and more coming every year. Then let's say there is a finite number of people capable of working on them, how do you decide which cure we're going to target. The tradeoffs are a consequence of limited resources, not the system.
Market based health care does make me uncomfortable though, mainly because the incentives aren't in curing but in perpetual treatment to generate an income stream.