Advanced market commitments, i.e. governments signing contracts that guarantee they'll pay $X hundred million for a solution BEFORE the research has been done, is the way to incentivize this while avoiding the disincentive of governments becoming extremely tough monopsonic price negotiators once the drug has been developed.
The development of more drugs could be funded this way, through global health organizations like GAVI, such that medicine wouldn't need to be developed by gouging some for the benefit of others.