There is a difference between science, a.k.a. basic research, and technology, a.k.a. applied science. A popular justification for funding basic research is that it suffers the positive external effects you mention, but this is inappropriately conflating science and technology. Technology doesn’t suffer from external effects. The patent system and the profit motive allow for technological goods and services to be excludable.
There is a difference between science, a.k.a. basic research, and technology, a.k.a. applied science. A popular justification for funding basic research is that it suffers the positive external effects you mention, but this is inappropriately conflating science and technology. Technology doesn’t suffer from external effects. The patent system and the profit motive allow for technological goods and services to be excludable.