I think Harry Potter is an interesting case in this respect. The first book was published just a month after Tony Blair came to office in a blaze of Cool Britannia; the last was published just a month after his resignation. Both these golden lads got out before the economy came to dust, and during their coterminous tenure the UK was - or was generally believed to be - prosperous.
Yet the Potter books are drenched in a very old-fashioned kind of class consciousness - certainly, at the beginning. How ridiculous Dudley looks in his Smeltings uniform in The Philosopher's Stone! The very name of his school betrays the fact that it isn't a real public school, but the kind of place where people whose fathers* are in vulgar industry - making drills, for example - send their oikish offspring. And Hogwarts, with its reassuring steam trains, quill pens, and robes (they aren't ridiculous at all, oh no) is just such an escapist confection as the National Trust might have dreamed up. It reads like an austerity-era book - which, since it was written during Rowling's own years of relative personal austerity, is perhaps not surprising.
Of course, things don't stay that way. And what I'd like to see - to complement fjm's excellent 2001 essay on the politics of Harry Potter (which it is obligatory to cite in discussions of this kind) - is a comparative analysis of the ways in which the UK's later fortunes under Blair parallel those of the later Potterverse, where initial certainties gradually drain away, or are warped by fear and paranoia, to an extent I don't think Blair or Rowling ever anticipated. Certainly Rowling's limp epilogue at the end of Book 7, in which the status quo ante is nominally restored, seems as inadequate a response to what she has actually written as Blair's account of himself in his schmaltzy resignation speech was to what he had actually done.
Not that I'm going to write that study myself (I don't feel inclined to add to what I wrote about Potter in the Cambridge Companion to Fantasy Literature), but maybe in the vast forest of Harry Potter scholarship someone has already done it?
* There are no working mothers in the HP universe at all, apart from Hermione's mother, who never appears, and Tonks. (Unless you know different?)