I suspect a large percentage actually voted "leave" just to spite Cameron; nothing to to with the EU. Apart from the "little Englanders" dreaming of a "green and pleasant land" free from a "tyranny" that never existed, most voters hadn't got a clue as to what they were voting for, or against as demonstrated by Google after the result.
Here's another thought for you.
Consider that, in the run-up to the last General Election, all the polls consistently pointed to our having a 'hung Parliament', the expected outcome, another Coalition Government. Poll after poll said the same thing. They never varied.
What actually happened, of course, was that the Conservatives did far better than expected, obtained their working majority, and so went on to form their own Government, 'un-partnered' by any other Party.
I think the factor that nobody took into consideration was the Conservatives' promise to hold a Referendum, should they win. Labour refused to make any such promise. The LibDems were clearly, themselves, committed to Europe. ONLY the Conservatives offered an alternative.
That alternative swung victory towards the Conservatives .. was responsible for it.
'Brexit', I believe, was always more popular than anyone believed, including Cameron and his people. This remained a missing factor in everyone's calculations, with the result we've now seen - Brexit a reality, many reacting with shock at the fact of a clear majority wanting to quit the EU.
Summarising, I think you're entirely wrong about people wanting to 'spite' Cameron .. Brexit has been wanted for a long time, and people seized the opportunity Cameron gave them to vote for it. No spite is, or was, involved .. just the seizing of a much sought-after opportunity, one we'd waited to have for a considerable time.