So, the Harry Potter books-- especially the early ones out around the time Hurricanger was made-- really emphasized the competition between the various Houses. While there were four Houses in Harry Potter, only two were really important to the plot, Gryffindor and Slytherin.
Now, Hurricanger's theme is shinobi, which means that all the rangers are not just ninjas but
magic ninjas. They're super-Japanese wizards-in-training, basically. The Hayate School is basically Gryffindor, all noble and heroic and junk, while the Ikazuchi School emphasizes the back-stabbing egotism that always characterizes Slytherin in the early books.
The main conflict in Hurricanger to me always felt like it was really between the Hayate and Ikazuchi ninja, not really with the villains. I always had this sense that if the two schools could just get along, beating the bad guys was a foregone conclusion. This is also one of the big ideas of early Harry Potter that pays off later on.
Magiranger uses more of Harry Potter's surface tropes, particularly the magic spells, but the characters don't have much in common with the novel characters. Meanwhile, the Hayato protagonist trio are basically just Harry/Ron/Hermione made more Japanese and into ninjas and the Ikazuchi duo are Draco Malfoy's traits divided between two different people.
Likewise, Magiranger's plot has basically nothing to do with the sort of story the Harry Potter novels tell. It's a very typical Super Sentai story. I'm not saying this is a bad thing, but... if you want to imagine what Harry Potter would be like as Sentai, Hurricanger really goes there while Magiranger only takes on the surface elements of the idea.