Americans bear the bulk of these costs, which are passed along in the price of their treatments, because much of the rest of the world has instituted price caps that are too low to cover the full cost of R&D, from basic science to a product approved for sale. (These treatments are nevertheless available in other countries because the marginal cost of synthesizing a pill or building a device that's already been developed is low.) It's a classic free-rider problem.
Edit: the statement about R&D costs is one excellent example of this. This thread is not the first place I've heard it, by any means. It's inevitably framed as the US subsidizing the rest of the world but without any quantitative analysis of it. The assertion evaporates when you actually look at the numbers, of course. Another excellent example was when my father claimed, no doubt prompted by right-wing talk radio, that the life expectancy gap was driven by the much higher murder rate in the US compared to European countries. Upon plugging in the numbers, I found that, assuming an absolute worst case (every murdered American is an infant, losing all ~80 years of life), dropping the US murder rate to zero would increase American life expectancy by six months.
I get how people can be wrong sometimes, but the way it spreads, the way people hear things and never check them or even apply a basic smell test, and the way these complete falsehoods manage to shape national debate is just crazy.
Medical R&D in the US amounts to about $100 billion/year. (I misremembered a slightly higher number previously, but the ballpark is the same.) Meanwhile, the US is spending in the neighborhood of $1 trillion/year more on health care than if spending were on the same level as a typical European country. Yes, I understand that those R&D costs get baked into medical costs, but they simply don't account for the vast majority of the discrepancy.
If the US system cost the same as a typical European system with the exception of US R&D spending on top, the discrepancy would only be around 10% of what it actually is.