Competition drives down
profits, not necessarily costs. If you passed a law that funds pharma startups to produce drugs, you would reduce profits and increase costs (through taxes).
Cost goes down with increased productivity. Competition sometimes brings that, sometimes it doesn't.
Economics can be complex!