"The unions were pretty ambiguous, as well."
That's not actually true. There was a great deal of internal debate within the major unions to understand the issues - and a lot of material was provided to explain those issues to members. And remember that all this was being done against the backdrop of massive resources having to be deployed to fight the Trade Union Act, and in particular (until the Tories dropped it) the threat to abolish check off in the public sector with just three months' notice, necessitating a single minded focus by the big public services unions on switching members to direct debit, instead of on the referendum.
Huge efforts were made to campaign for a Remain vote - but in the end, immigration fears carried the day for a lot of people.
There was also a minority who believed an intellectual left argument that the EU should be rejected for ideological reasons - in particular because of the EU dismantling of collective bargaining structures in Greece, Portugal, Spain, Italy etc.
In the end, however, only three relatively small national unions - RMT, ASLEF and the Bakers and Allied Workers Union - campaigned to leave the EU.
Frances O Grady did a good job IMHO, although it was a shame that we didn't get to hear more from other strong moderate voices such as Dave Prentis of Unison.
The real problem, in my view, was that the campaign was fatally flawed through being led by Cameron. Having called the referendum, he should have stepped back. His credibility was shot to pieces by calling a referendum and then arguing that voting in favour of one side rather than the other would have catastrophic consequences. Either he was incompetent or mendacious - or possibly both.