I don't think it's as simple as rich and educated= in, poor and poorly educated=leave, but I think it's a factor. I am British but don't currently live in the UK. I'm not sure whether this disqualifies me from an opinion, or makes it easier to see things because I'm at a bit of a distance and it's easier to see change if you only visit periodically. Anyway, here's my thoughts-
I feel that over the last 20 years or so, a large percentage of the electorate has essentially been disenfranchised by both the main parties. By trying to appeal to a broader electorate, Blair lost the genuine working classes and the Tories obviously didn't do much to get them back. Neither party has been prepared to engage on the subject of immigration, which was a huge mistake. You have to engage, not dismiss. Both parties have pursued a very globalised and London-centric policy platform. Culturally, I also feel that the political and intellectual elites have become increasingly sneery about "ordinary people", for want of a better word- there's something wrong with you if you just want a quiet and uneventful life, living up the road from your mum, working at the car plant and playing 5 a side on Saturdays. The Labour party, which is supposed to be the champion of the working classes seems to have spent most of today on FB slagging them off (and then they wonder why they lost the last election- anyway, I digress). In short, there are a lot of people in the UK who feel (quite legitimately) that they do not have a stake in the status quo, so why the fuck shouldn't they take a punt on something else? They feel they have nothing to lose.
I guess basically I can't understand why everyone in the UK is so surprised by this outcome unless they never set foot outside the M25. Didn't the Labour election defeat in 2015 and the high UKIP poll suggest this might happen?
It's disenfranchisement. One of the parties needs to bring these people back into the fold of mainstream politics.