How do you get around that? Inventions and creative works get around it with patents and copyrights, respectively. How does an efficacy-testing company protect its results, since as matters of fact, they aren't covered by copyright.
I'm arguing that free riding isn't a problem in this case.
Drug companies have a rather unique demand for credible certification of their products' efficacy. Of course, some certifications will simply be shills for the drug companies, but doctors and health insurers will learn which certifying agencies are more honest than others and hence certification from a more honest firm will be worth more to the drug company since it will boost sales more.[1] It's no more of a "free rider" problem than Google, which has tons of free riders (search users) but whose customers (advertisers) want there to be more free riders, not less. Likewise, drug companies will want to get a certification that has tons of doctors and insurance companies and pharmacies that respect that certification, even though those are all "free riders".
So if testing the efficacy of new drugs costs only a nominal amount of money, how would eliminating this requirement save us enough money to make it worthwhile? Also, if anything the market shows us that no one is willing to test the efficacy of drugs except for the drug companies. How many non-profit pharmaceutical companies are there, other than MAPS?