What people are failing to understand is anyone can write a song about a cartoon or other fictional character. You can mention cartoon characters and movie characters all day. Things that will get you in trouble include using actual logos of the characters in artwork, copying lyrics in a book, magazine or song they perform.
Shonen Knife - Buttercup (I'm a Supergirl) - Buttercup is a Powerpuff Girl.
Devo - Go Monkey Go - this one is kind of a cop-out, because Mark Mothersbaugh of Devo is Nickelodeon's music director.
Coasters - Charlie Brown - no explanation necessary.
Coolio - Dexter (What's His Name?) - ode to Dexter's Laboratory.
David Bowie - Life On Mars? - mentions Mickey Mouse as well as the comic strip Alley Oop.
Kinks - Wish I Could Fly Like Superman
REM - Superman
Barbra Streisand - Superman
Spin Doctors - Two Princes (about trying to win Superman's girlfriend, mentions him a lot)
Here's a personal favorite, which had to cite Hanna-Barbera for the sound bytes. My twin brother and I air banded this to perfection, (John on guitar, me on drums) with air bass and some lean-in "Yabba Dabba Do Time" vocals from starting power forward Brad Hill from the #1 ranked junior college team in the late 80s, at Sheridan College, Wyoming.
Screaming Blue Messiahs - Wanna Be A Flintstone
https://www.youtube.com/watch?v=NGZenzfg3A0