This discussion by Roger Scully about why people in the Welsh Valleys voted Leave is depressing although not surprising. In essence it is immigration, bolstered by local stories of Polish people coming into communities and reducing wages. I doubt if quoting econometric studies about how little immigration influences wages would make much difference to these attitudes (although that is no excuse for people in authority who should know better ignoring these studies). I think it is attitudes like this, in places unused to immigration partly because work is not plentiful, that makes some politicians say that arguing in favour of immigration is ‘politically impossible’.
This is the first link between immigration and austerity I want to draw. The Labour party before 2015 had also decided that attacking austerity was politically impossible: ‘the argument had been lost’. Focus groups told them that people had become convinced that the government should tighten its belt because governments were just like households. The mistake here, as I wrote many times, was to assume attitudes were fixed rather than contextual. I was right: austerity is no longer a vote winner. 
Why might attitudes to immigration change? I strongly suspect that anti-immigration attitudes, along with suspicion about benefit claimants, become stronger in bad times. When real wages are rising it is difficult to fire people up with arguments that they would have risen even faster in the absence of immigration. But when real wages are falling, as they have been in the UK in an unprecedented way over the last decade, it is much easier to blame outsiders. Equally when public services deteriorate it is easy to blame newcomers.
It is wrong to think that this only happens among working class, left behind communities. Catalonia is a relatively rich part of Spain, and there has always been resentment about this area ‘subsidising’ the rest of the country. But it is very noticeable how support for pro-independence parties increased sharply as Spain turned to austerity, although that could also be a reaction to corruption scandals.
Here is the second link between immigration attitudes and austerity. Austerity has contributed to the slow growth in real wages and is the main cause of deteriorating public services, but often outsiders are easier to blame.
This is particularly true when it is in the interests of the governing political party and its supporters in the press to deflect criticism of austerity by pretending immigration is the real cause of people's woes. This is the third link between austerity and immigration, and it is one deliberately created and encouraged by right wing political parties. In this way Brexit has its own self-reinforcing dynamic. People vote for it because of immigration, its prospect leads to falling real wages as sterling falls and the economy falters, which adds to bad times and anti-immigrant attitudes.
If all this seems very pessimistic, it shouldn’t be. While the right will almost certainly continue to play the anti-immigration card in the short term, because they have few other cards to play, they can be opposed by a left that makes the case for immigration. As just as views on austerity have clearly changed, so can views on immigration. particularly once hard times come to an end.
However it is a mistake to imagine it is all about economics, or even ‘culture’. One of the unfortunate consequences of the culture vs economics debate over populism is the implication that one way or another views are deterministic, and the only issue is what kind of determinism. The reason I go on about the media so much is that information matters a lot too. Although people may be anti-immigration because they have xenophobic tendencies which are reinforced when times are bad, they can also be anti-immigration because they have poor information, or worse still have been fed deliberately misleading facts.
In my intray of studies to write about for some time has been this paper by Alexis Grigorieff, Christopher Roth and Diego Ubfal. (Sam Bowman reminded me it was there from this piece.) It is well known that people tend to overestimate the number of immigrants in their country. This international experiment showed that when people were given the correct information, a significant number changed their views. What is more, this change of view was permanent rather than temporary. Here is a VoxEU post about an experiment from Japan pointing in the same direction.
As well as emphasising simple information like this, politicians should expose the kind of tricks people promoting tougher controls on immigration play. The public tends to be receptive to the idea that it is beneficial for the economy to have immigrants with important skills, so they switch to calling for controls on low paid, low skilled workers. As Jonathan Portes demonstrates, that in practice can involve plenty of pretty skilled workers. The trick for pro-immigration politicians is to ask which occupations do we want to exclude: nurses, care workers, construction workers, primary school teachers, chefs? With UK unemployment relatively low, there are not many jobs where employers are not complaining of shortages.
Of course most people want to stop immigrants coming here and claiming unemployment benefit. This is why newspapers keep playing the trick of talking about the large number of migrants ‘who are not employed’, conveniently forgetting to mention that this includes people like mothers looking after children. In reality unemployment among EU immigrants is below that among the native population. In addition, we can already deport EU immigrants that remain unemployed under EU law if the government could be bothered to do so.
For politicians who do want to start making the case for immigration, the place I would start is public services. Few economists would dispute that immigrants pay more in tax than they take out in using public services. Yet most of the public believe the opposite. In this post entitled ‘Is Austerity to blame for Brexit’ I show a poll where the biggest reason people give for EU immigration being bad is its impact on the NHS. Getting the true information out there will have a big effect. Just as public attitudes to austerity can change, so can they over immigration, but only if politicians on the left start getting the facts out there.
 To be fair, whether I would have been right in 2014/15 if Labour had taken a clear anti-austerity line we do not know.