I'm not a corporate lawyer but in my experience in the financial markets it is simply impossible to avoid liability while holding equity. Maybe there are some loopholes but it is not nearly as easy as you suggest.
Pay a company for distribution and logistics expertise and make that transfer-pricing arrangement profitable for the logistics company.
Then, what profit remains goes to the company owning the patent on the drug (and the liability). The parent company could hold limited partnership stakes, convertible bond and/or options with a fixed term (which might be conveniently the same length as the patent term). If the drug "survives" 17 or 20 years without significant lawsuits, call in the options and claim your equity. If the drug explodes and tanks the discovering company, the parent company holds options, bonds or LP shares that are now worthless. Still, they're in business.
However, the moral questions are quite obvious, and it seems obvious to me that there would be consumer watchdog groups (like Consumer Reports) that would keep us abreast of these antics. Even if the law can't pierce the corporation, crowdsourcing and reputation certainly can.
Each drug gets passed through to a holding company that funds R&D and assumes liability. How do you hold Pfizer or Novartis resonsible for a drug they don't "own"?