There's another way to look at it.
The strongest remain areas are also those where people *feel* as if they have a reasonable say in local decision making. Scotland has its parliament and a fair degree of automony. London has an elected mayor with enough authority to make a difference in areas that Londoners care about. Northern Ireland is slightly different but after putting up with direct rule from Westminster during the troubles now has home rule at Stormont and despite occasional "tribal" difficulties it does appear that most people are satisfied with the arrangement.
Somewhat different in the leave areas. The Welsh have an assembly with restricted powers and many members who seem to be disconnected with the wishes of the people, particularly in Mid and North Wales. And in the English regions there is a very strong feeling of being ignored by Westminster with all the focus being on London.
Ironically the Maastricht Treaty contained references to the concept of subsidiarity, ie the devolution of decision making to the most local area appropriate to the issue being considered. Most European countries are strong proponents of this. But the Major government, and its successors, have as good as ignored this as much as possible, in particular by continuing the strangling of local authority funding begun by Thatcher. The Scottish independence referendum lead subsequently to calls for much more English devolution but so far this has made little progress.
The apparent dislike of foreigners being expressed in leave areas is just the traditional scapegoating that so often appears during times of economic gloom and is not unique to this country.
I'm a strong supporter of devolution, with decisions being taken at the lowest sensible level. The whole point of the EU is that some decisions are better taken at European level than at national level. The UK is one of the most centralised countries in Europe.
The Blair government planned regional assemblies in England. However, voters in the North East rejected the idea in the referendum by 77% - see https://en.wikipedia.org/wiki/Northern_England_devolution_referendums,_2004 - another really really stupid referendum result. Plans for other assemblies were cancelled.
I think it is valid to note that actual experience of migrants seems unlikely to have increased the leave vote, because the areas where people voted leave were generally the areas with the fewest migrants.