it's actually easy to resolve, give/impose on the illegals (pick whichever suits your viewpoint) a temporary visa allowing them to work and live in the USA for a period of, let's say 2 years, during which time they must apply for full residency. This gets them in the system, gets them paying taxes, gets them access to benefits and healthcare and gives them a route to a "better life". USA retains the benefit of the workers.
Failing to register becomes a deportable offense within oh I don't know, 6 months, meaning you should then have a smaller issue to deal with.
Of course to make it attractive, the permanent residency should be readily achievable, rule out those with criminal records for violent, sexual or class A drug offenses, let the rest in.
Obviously you'll have to absorb any economic impact of higher wages, higher social security costs etc, but hey, there's no such thing as a free lunch is there?
This politics lark is easy , Vote Flook for PM/Prez