I get where you're coming from, but I think your idea moves too far in the opposite direction.
Vaccines are somewhat different as "drugs". They are typically inactivated virus or bacteria (or fragments of them), so the safety risk is somewhat muted in the sense you aren't introducing something completely new into the body. The risk is still there, but not as much as a completely new molecule.
If you were to test new drugs on terminally ill patients and the patient died, was it the drug? Or did they die form their disease? Sometimes you can, often you can't. When you do clinical trials you're trying to eliminate any many variables as possible by running the trial on a relatively homogeneous population. That's why they do phase 1 with healthy volunteers.
The other challenge is that when human testing goes wrong, it can go horribly wrong. Check out the clinical trial of the FAAH Bial compound where people died. Also, TGN1412.
If you treat a terminally ill patient and they die, then you can still learn something. Maybe there was no effect at all on the target illness, e.g. the cancer spread and grew anyway. Maybe there was a large effect but the side effects were too severe, in which case you can investigate strategies for mitigation.
TGN1412 is a good example. This drug turned out to provoke the immune system in an extreme way. What if it had been tested first on cancer patients and, even with the life-threatening side effects, it worked as a cancer immunotherapy? Then we would be able to work on dosing or mitigation. Instead, the company folded, the research was abandoned and we'll probably never know.
And further, it's a cold calculation but instead of having healthy lives ruined you would have terminally ill patients die slightly sooner.
Frankly I think this is a ridiculous, inhumane, and fundamentally ignorant point of view.
Ridiculous - The idea of testing drugs with the hope that they magically treat something completely unexpected and without any theoretical framework supporting it.
Inhumane - Terminally ill people could hardly consent en masse to such a program. I suppose there is a utopic idea here, but you might as well wish everyone were healthy forever.
Fundamentally ignorant - The previous comment explained why terminally ill patients with many different medical problems would make poor subjects for a study that ostensibly informs medicine applied to generally healthy people.
"Ridiculous": the whole point of the OP is that we don't have good predictive models for what treatments will be effective. We have hunches and theories but it is currently too costly to go through the whole process to test them all. One approach would be develop better models, but I'm suggesting another approach would be to reduce the cost of testing them in the real target.
"Inhumane": well that's the ethical question. Some countries compell vaccination because of the societal benefit. I'm not even proposing compulsion.
"Fundamentally ignorant": in the end medicine is needed to treat sick people, not healthy people. The OP makes the point that sometimes a biased, representative sample is better than an unbiased, unrepresentative sample.
Vaccines are somewhat different as "drugs". They are typically inactivated virus or bacteria (or fragments of them), so the safety risk is somewhat muted in the sense you aren't introducing something completely new into the body. The risk is still there, but not as much as a completely new molecule.
If you were to test new drugs on terminally ill patients and the patient died, was it the drug? Or did they die form their disease? Sometimes you can, often you can't. When you do clinical trials you're trying to eliminate any many variables as possible by running the trial on a relatively homogeneous population. That's why they do phase 1 with healthy volunteers.
The other challenge is that when human testing goes wrong, it can go horribly wrong. Check out the clinical trial of the FAAH Bial compound where people died. Also, TGN1412.