Way before Harry Potter, there was Polgara the Sorceress and her mother Poledra. While both of them could be said to have played second fiddle to the preeminent Belgarath, there was no doubt that their power was of the same nature as that of his. There was also Sephrenia and her goddess Aphrael, but then I guess David Eddings wasn't as popular as J.K. Rowling is.
One of J. K. Rowling's truly great accomplishments (that is, one of the things that if anything isn't praised enough) is that she takes a very liberal worldview and she portrays it in such a straightforward manner that very few people think to argue with the things she's talking about.
She describes a world where there's no difference between men and women. There are heroes and villains on both sides. Furthermore, women aren't made out to be fundamentally superior or inferior in terms of emotion versus ration. She makes the difference apparent - you get dumb guy moments and giggly girl moments - but at the same time, every character has dumb blind emotional moments, and moments where a clear head prevails.
She does similar things with racism and libertarianism. (That's not to say Rowling is ultralibertarian, but she expresses certain views - like the fallibility of government and the acknowledgement that people aren't created entirely equal - that promote the agenda, while simultaneously being mature enough to acknowledge that government isn't inherently bad and that people are defined by more than just their talent.) The funny thing is that the one thing she's accused of - promoting witchcraft - is the least radical of the various things she tries to do. Combine that with a very adult understanding of death couched into a book series that, for the first few books, was considered fluff kid fantasy, and you realize that Rowling is very underrated as a kid's author. People ignore her merits for her popularity, which is a shame.
Eddings, from all I've heard, is a talented writer, but he's not good at reaching out to a wide audience. He's a niche writer. Rowling, meanwhile, has a talent for making people fall in love with her writing that I've rarely seen in any writer, and she combines that with surprisingly mature plot development.
Yeah, Harry Potter's definitely an escape. There's a psychotic mass murderer who leads a fanatic cult into a school and has them killing droves of people, an 18-year-old attempts to kill a group of students just to take a treasure from them and ends up burning alive, a man spends a lifetime obsessed with a woman only to lead to her death and get killed by a snake.
For what it's worth, I've got quite a few female friends who don't get treated necessarily like stereotypical females because they quite clearly aren't. Maybe I'm just in a lucky part of the world, but I haven't seen females get discriminated against much unless they invited it on themselves.