This article might be interesting reading:
http://levine.sscnet.ucla.edu/papers/ip.ch.9.m1004.pdfSkimming it, it doesn't really explain the means by which pharmaceutical companies succeed under weak or absent patent laws, it just says that they do. It seems to leave open the explanation, "Chemical and pharmaceutical companies in countries with weak or no patent laws make most of their money by selling into countries that have such laws." I haven't read it too carefully, though. It does say that they exaggerate their costs (presumably so as to argue for patent laws); that lots of those costs are perverse (e.g. bribing doctors); and that the patent laws inhibit innovation in lots of ways.
Meanwhile, I vaguely remember reading someone's proposal: Health insurance companies, at least in theory, basically make a bet that their customers will have good health. Let's suppose a health insurance company has 100k customers, and it's expected that 0.1% of them (let's say there's no way to tell who) will develop disease X sometime during the term of their insurance plan, and the treatment for disease X costs $50k. Then the expected total cost per customer is .001 * $50k = $50. The insurance company would therefore be fine agreeing to cover all costs of treating X for any insurance premium exceeding $50 over the term of the plan. Let's say they charge $70 to cover that particular item, and risk-averse customers agree to it. This is the classical notion of health insurance (I think in practice it's diverged significantly from that).
Once these plans are agreed to, the insurance company stands to bear an expected $50 * 100k = $5m of costs (for $7m in revenue). Now, if the insurance company has some way of, say, spending $2m to fund medical research that cuts the cost of treating X from $50k to $25k, then that would save them $2.5m in costs. (Making no reference to patenting or even selling the drug.)
Now, research is almost never guaranteed to produce the results you expect (arguably it wouldn't be called "research", merely "implementation"), and furthermore it takes time, perhaps longer than the term of the insurance plans. The uncertainty might be handled with a research consultant who makes "educated guesses" as to the expected value of different research paths. As for the time taken, (a) you could project how many insurance plans of this type you expect to have at the time the research completes, and (b) you could work something out with other insurance companies that provide similar plans. Which brings me to the biggest point:
I chose the figure of 100k customers. What if we imagine either a very large health insurance provider, or a joint effort by multiple insurance companies? Company A expects to have 5m insurance plans covering disease X when the research completes; company B expects 10m; company A will contribute $z and B will contribute $2z, or perhaps they'll just commit to funding the research and then find out how many plans they have when the research completes and divide the costs at that point. With a total of 15m customers, the research is now profitable if it costs anything less than 15m * $25 = $375m. The wider the consortium can be, the wider the range of treatments it will now become profitable to research.