Considering taxes for more conventional jobs, $40k under-the-table cash would be the equivalent of $60-70k of conventional wage income. Depending on city and state, that would be either solidly middle income or lower middle income.
First, many undocumented immigrants pay state and federal taxes; it's difficult to obtain a bank account otherwise. Second, their exclusion from the regular system of credit scoring and numerous other aspects of the economy that most people take for granted impose a significant hidden tax, albeit one that mostly flows to private actors such as landlords etc..