Alan Moore really, really hates Harry Potter. His Top 10 spin-off fantasy mini-series Smax features a field trip from a wizard school being horribly killed by a dragon because of their teacher's recklessness (a reference to common fan criticisms of Hogwarts staff's casual attitude to dangerous creatures). The League of Extraordinary Gentlemen: Century turns into an incredibly vitriolic denunciation of Potter as artistically and politically reactionary, with Harry massacring the entire rest of the Potter cast, turning out to be literally The Antichrist, and finally getting killed by Mary Poppins.
In the Chick Tract "The Nervous Witch", Samantha explains to her evangelical uncle that she and her friend Holly got into witchcraft through the Harry Potter books. The uncle advises her to burn them all along with the occultic stuff.
Peter Grant in Rivers of London frequently uses Harry Potter as an analogy, such as comparing the Wizarding School his boss attended to Hogwarts, or calling a game where the players use magic to chuck tennis balls at each other "Pocket Quidditch". Whispers Underground opens with Snooping Little Kid Abigail looking for the Hogwarts Express. (That is, she's quick to explain, the train they used in the films. Not the actual Hogwarts Express, because it doesn't exist.)
Discworld tends to avoid them, because it's going to get accused of ripping off Rowling whatever happens, but in the Ankh-Morpork Post Office Diary there's a brief mention of Unseen University having an owl-based postal service. (This being Discworld, it was abandoned when they realised the owls were just using the letters as nesting material.)
Live Action TV
Supernatural had one episode where a female was being used as bait. She was nervous until encouraged to think of her favorite heroes. She picked Hermione and listed several facts about her before being told to focus.
The Big Bang Theory: In one episode Leonard reads the last book, and Sheldon and even Penny spoil several plot points for him.
In the Doctor Who episode "The Shakespeare Code" the Doctor mentions having cried reading the last book. The episode aired before Deathly Hallows was published. Additionally, Martha banishes the episode's villains with a spell ending "Expelliamus!".
In Agents of S.H.I.E.L.D., Lance Hunter explicitly compares most of the so-called "Real SHIELD" to Hufflepuff as a way of insulting them.
A season one episode has Skye refer to the SHIELD academy as "SHIELD Hogwarts."
In the pilot, a beleaguered Simmons says that she isn't Hermione.
In an episode of Rooster Teeth Shorts, it turns out that Joel was only halfway through on the book series before Matt spoiled it for him.
During The YoGPoD, when doing a musical quiz using iTunes and the "shuffle" feature, many of Lewis Brindley's answers are tracks from the audiobooks, causing Simon Lane to ask incredulously if he actually has any music on his computer.
At the start of the Minecraft series Magic Police, Duncan Jones and Sjin start discussing the series, only for one of the duo to mistake the spell "crucio" for "crucify", which causes them to remark that the series would have taken a darker turn if that had been the case.
Cards Against Humanity has at least three cards relating to the franchise. The first is "Next from JK Rowling: Harry Potter and the Chamber Of _____", while another is "Daniel Radcliffe's delicious arsehole" and a third is about "Harry Potter Erotica".
In "Trilogy of Error", Ned Flanders reads a book to Rod and Todd and says that Harry and his friends "went straight to Hell for practicing witchcraft" before throwing the book in the fireplace, a reference to the books' controversy in Christian circles.
In "The Regina Monologues", while the family visits England, Lisa meets J. K. Rowling and compliments her on getting an entire generation of children into reading.
In "Homer and Ned's Hail Mary Pass", Marge criticizes Ned's Bible films as being too gory while also glancing over the Bible's sweeter moments. Ned sarcastically asks if she'd rather see films about "a liberal European wizard school".
The sub-plot for "The Haw-Hawed Couple" has Homer and Lisa reading an Angelica Button book; Homer reads ahead and is devastated by the death of the Dumbledore's counterpart.
The episode "Smoke on the Daughter" opens with the family attending the launch of the final Angelica Button book. Lisa argues with Comic Book Guy over whether the costumes refer to the books or the films.
In "The Bob Next Door", Sideshow Bob describes his latest plan to kill Bart as "the greatest murder since Snape killed Dumbledore."