Dictating state policy to states is not an enumerated power. Securing the borders against invasion is. Under the 10th, a federalist rejects just about all federal mandates unless they can be tied to an enumerated federal power that states are violating.
Neither is building a wall.
I simply don't have a problem with the feds saying public services can't be used for illegals. If you prefer, we can limit it to those public services where federal money is used at all in the provision of those services. (And lets face it, there are few if any local public services that don't use some federal money.)
Maybe the answer is to let the states do what they want, but those states who choose to provide public services to illegals lose all their federal funding. How about that?