Don't try to pretend that phrase "general welfare" means "blank check". It don't. Article 1 Section 8 detail what SPECIFIC powers the Congress has to promote the "general welfare". It does not list "education of the masses" as an option.
The Tenth Amendment states that what isn't specifically granted to the Congress is reserved to the States. There's no exception listed in that amendment.
President Jefferson in one of his State of the Union messages stated that since his opinion was that the interests of the nation would be best served if the government financed some form of minimum public education, it would be nice if the Congress would pass an Amendment to the Constitution permitting Congress to appropriate those funds for that purpose.
Congress did not pass the Amendment, ever.
Congress did not appropriate the funds at that time.
Federal funding for education is a violation of the Constitution.
Also, both Madison and Hamilton agree on one point, they who disagreed on many points....the purpose of specifically defining the powers of Congress in Article 1, Section 8 was to prevent the Congress from assuming other powers, and that it makes absolutely no sense to claim that any clause grants Congress unlimited power that would undermine and eliminate the specific enumeration of powers contained in Article 1, Section 8.
Almost nothing the 21st Century US congress does is legal, because almost nothing they do is Constitutional. Almost everything they do is outside the scope allotted them by Article 1, Section 8.