We’re in a capitalist system, so I had assumed that allocation would happen via the free job market: people with money write job descriptions for scientists to work on particular things, and the scientists decide which of those offers to pursue. Central control of this sort of thing hasn’t historically worked out well (though I may be biased on this point from growing up in the US).
As for switching fields, one of the key parts of scientific training is how to learn things, so scientists have a better chance of successfully changing felds than many other people. It also isn’t necessarily as big a leap as physics to biochem, like you suggested in another comment. Moving from theoretical particle physics to tokamak design seems like it should be doable, for instance.