French philosopher Jean-Claude Milner thinks so, but I can't tell from this article
what his rationale is.
He does state that Hogwarts is "a form of opposition to the values of the profit-seeking market economy," but he must be reading some parallel-universe J. K. Rowling. This is the same Hogwarts that served as the proving ground for Fred and George Weasley's joke-shop capitalist venture - for which Harry Potter happened to provide capital.
One has to grasp at straws to find a lot of political messages in the Harry Potter books - although the idea of boarding school children carrying loaded weaponry to class isn't exactly a hallmark of the left...