It was the US Supreme Court that did that, in Plyler v. Doe.
Not to say that Congress isn't in agreement with SCOTUS in this matter, just saying that it wasn't Congress that handed down the "everybody in the country (legal or illegal presence makes no difference) is entitled to public K-12 education" ruling.
Mea culpa. It was Congress IIRC than mandated the health provisions. The point being, that the fed govt inserts itself into local matters that the local jurisdictions have to deal with/fund, then when a state decides for its own reasons that it will extend in part a federal mandate/benefit, the feds jump in again and say, but you can’t do THAT. The feds DO try to have it both ways, and that leaves it to the states to deal with the situations the best way they know.
I chose to live in a state that not only doesn’t subsidize in-state tuition for illegals, but (last I heard) my state won’t even ADMIT them to state schools. That works for me. But I don’t live in TX/CA or any of the other states that offer the in-state tuition break. And, as far as I’m concerned, it is up to each of the states, and the feds should butt out. But that’s just me.