1. Pharmas separate drug R&D from manufacturing and sales.
2. R&D companies submit proposals to the FDA for new drugs they want to develop. The FDA can also send out RFPs for drugs they'd like to prioritize.
3. The FDA chooses drugs based on likely public benefit, rather than the profitability-driven selection we have today.
4. The FDA _funds the R&D_ for the drugs it chooses. This allows the R&D company to operate with positive cash flow, separately from the eventual (possible) future income from manufacturing and sales. This is also the incentive for developing drugs that aren't patentable, or which will be required only in small quantities.
5. When a drug is approved for release, the FDA will license one or more manufacturers to produce it, based on their quality, cost, and scale. This is why the Pharmas break into separate companies. Some may focus only on R&D, some may focus only on manufacturing. Some manufacturers can focus on large-scale high volume production, while others can focus on small-scale production. This prevents the excuse for charging huge prices for rarely-needed drugs "because the equipment needed would otherwise be producing much higher volume drugs at lower cost".
This arm of the FDA would be funded partly by the public, and partly by licensing fees. The math for insurance costs and premiums would change because retails prices for most drugs would drop. That would make insurance cheaper, and some of those savings would probably need to go towards a tax for the FDA's R&D funding. But longer term, the licensing fees might be adequate on their own since the FDA would operate as a non-profit.