Guaranteed wealthy clients and investors exist in free markets too. That doesn’t make them Tech creators, that merit is still reserved to the startup itself.
Both Moderna and BioNTech were funded and working on the mRNA technology before governments came with large orders for the vaccines.
If you have guaranteed clients, you're not selling on a free market. This is one of the reasons why you can't have have (healthy) free markets in medicine in general.
And yes, while BioNTech and Moderna had been investing in mRNA before this, governments had been investing in mRNA research for many years. BioNTech itself has received significant investments from the EU, at least since 2019.
Both Moderna and BioNTech were funded and working on the mRNA technology before governments came with large orders for the vaccines.