It isn't really about the 'EU.' The problem lies somewhere else. The 'EU' is merely a convinient vehicle people can project their feelings of disatisfaction onto. The country will still be as 'shitty' outside the European Union as inside it.
The massive inequalities, the polorisation inside the UK, the meltdown of the political culture; don't have much to do with the European Union at all. The huge chasm between the ruling elite in the UK and huge swathes of the population who've been left behind, was caused internally, not because of the European Union. All that's an excuse for structural failures in the UK's political system and economy; not the EU's fault.
Leftwing and rightwing nationalists share a view of Europe that reminds me of Hitler's phantom explanation for Germany's woes after WW1, blaming the problems on foreigners who were undermining an otherwise healthy nation. It was lies then, it's leis now.