It just wasn't profitable to put a lot of research into. Vaccines are the most obvious application, and vaccines just aren't profitable most of the time. There are few endemic diseases in wealthy countries, and even fewer where you can sell every person a dose in a few years. For most diseases, the total number of doses sold during the patent period would be relatively small. For example, a potential hepatitis C vaccine would probably look like the hep B vaccine's deployment -- with some ~200 million hep B vaccines given the USA over the last 40 years. Compare to a similar number of COVID-19 vaccines sold in under 12 months.
The underlying technology may well be the cure for many types of cancer and a broad solution to most infectious disease. But again, that likely wouldn't pay off while the patents are in effect. So no point in investing heavily.
Pfizer and Moderna were both sitting on quite a lot of proprietary knowledge, based on the sheer volume of patents filed since early last year. Some basic research, hoping for some breakthrough, but mostly just waiting for an opportune time to develop it into something that would be profitable.
They'd gain a benefit over pills in that a nurse is required to inject the patient