Some people think that the reference in the Constitution to the "general Welfare" covers this.
Some people think the enumerated powers in the actual articles of the Constitution describe precisely how the Federal Government is authorized to promote the general welfare.
However, even accepting “anything goes for the general welfare,” a good case can be made that the vast majority of government-funded research serves only the individual welfare of those who receive the money and those government employees who make the disbursement decisions and “manage” the programs.
This giant rent-seeking apparatus actually harms the “general welfare.” It can be argued that, while some important discoveries are made, these would be made by research funded in some other way, if not a dollar came from the Federal Government.