In the Porky Pig cartoon "Paying the Piper", where Porky portrays the Pied Piper and his foil is a cat (who's upset at the rats being gone) Porky experiences something similar to the Beetle Bailey example above:
During "The Beach", Zuko, Mai, Azula and Ty Lee end up spilling forth all their emotional baggage to one another. Azula chides Ty Lee for having run away to join a circus (even calling her a circus freak). Ty Lee, who is the youngest of six identical siblings immediately retorts that it was a way of finding her own identity, and that "Circus freak is a compliment!"
And then there was the lovely little family reunion between Zuko and his baby sister:
Zuko: You lied to me!
Azula: (smugly) Like I've never done that before.
Probably the best use of this occurs during the Day of Black Sun invasion. When Zuko confronts Ozai, this is part of the exchange:
Zuko: We've [the Fire Nation] created an era of fear in the world, and if we don't want the world to destroy itself, we need to replace it with an era of peace, and kindness.
Ozai: [laughing dismisively] Your uncle has gotten to you, hasn't he?
Zuko: [smiles] Yes, he has.
Another example in "The Ember Island Players":
Toph: It's obvious that the playwright did his research. I know it must hurt but what you're seeing up there on that stage is the truth.
Toph: [Hearing her voice actor] Wait a minute, I sound like...a guy. A really buff guy.
Katara: [Attempts to make fun of her] Well Toph, what you hear up there is the truth. It hurts, doesn't it?
Toph: [Smiles] Are you kidding me? I wouldn't have cast it any other way!
Rhino: (while chasing Spider-Man) You like being hunted, freak?! Spider-Man: Would you please look who's talking? Rhino: Oh, I may be a freak, but I'm not a coward!
Probably done more than once in The Simpsons, but this example stands out. When Bart was working for money in order to save up for something, he worked at a barber shop. He gets his pay and it's hair instead of money. Bart asks the barber about that and asks if the barber's crazy, and the barber smiles widely and nods, also laughing in a creepy way as a disturbed Bart backs out of the barber shop.
From another episode:
Homer: Hey, Flanders, you stink! Flanders: (cheerfully) Oops. Thanks for the nose-news. I'd better cancel that dinner party tonight.
In early episodes of the series (and merchandise related to the show), Bart replied to accusation that he was an "underachiever" by saying he was "proud of it". This was lampshaded in a much later episode (after his antics in many seasons made it clear that he was anything but), when he read his permanent record at Springfield Elementary:
Bart: (reading) "Underachiever and proud of it"? Man, how old is this thing?
In "Lisa's Substitute" Martin Prince, competing with Bart to become class president, put up a campaign poster with the slogan "A Vote for Bart is a Vote for Anarchy!". Bart of course put up another poster with the same slogan.
Upon seeing Bart in his pajamas, this attempt to capitalize on the situation by Jimbo quite conclusively backfired.
Later in "Hurricane Neddy", Homer and Ned's roles were reversed.
Homer Simpson: That's it, you just can't insult this guy. You call him a moron and he just sits there, grinning moronly.
In "Three Men and a Comic Book" Bart works his ass off for Mrs. Glick to earn enough money to buy the first issue of Radioactive Man. After doing all his hard work upon pay day she gives him two quarters.
Mrs. Glick: "Bart... you didn't say 'thank you.'"
Bart: "Listen lady, I can leave without screaming, I can leave without saying a bad word, but there is no way I'm saying 'thank you'!"
Mrs. Glick: "You're welcome!"
In "A Star is Burns":
Rainer: The film is just me in front of a brick wall for an hour and a half. It cost $80 million. Jay:(contemptuous) How do you sleep at night? Rainer: On top of a pile of money with many beautiful ladies. Jay: Just asking. Yeesh! (Long after the interview, Rainer Wolfcastle prepares to shoot Jay on the street, having just realised he's been insulted and made him look bad. Jay distracts Wolfcastle by telling him his shoes are untied and grabs a taxi. Hours later, Wolfcastle realises he's wearing loafers.)
Later, a female viewer commented on how beautiful Barney's movie was. Barney was sitting next to her and thanked you. She was then disgusted by him.
Woman: Eww! Did something crawl into your mouth and die? Barney: It didn't die. [The woman's eyes widened.]
Homer writes a song about how much Ned Flanders sucks, which turns into a huge hit. During the musical montage, we see that even Flanders loves the song and his sons scream in joy when the song describes them as "his creepy offspring".
In Bart's Girlfriend:
Bart: Jessica, you're very beautiful, but you're not very nice.
Jessica: Well, duh.
During her Shaming the Mob speech in The Boys Of Bummer, Marge mentions that Springfield has been called "The Meanest Town In America" and points to a nearby sign that shows the town was proud enough about this label to put it on the sign like it was something worth mentioning to tourists.
Rattrap: You're nothin' but a schemin' snake-in-the-grass! Starscream: Flattery will get you flattened, vermin.
Also a version where a genuine complement is basically taken as a backfired insult:
Blackarachnia: What are you looking at? Silverbolt: That star. It's a planet really. It's Venus. It reminds me of you. Blackarachnia: Dark, hot, deadly, and poisonous? You're sweet. Silverbolt: No, wait. That's not what I meant...
Vendetta: * while pretending to be Charlotte in mockery* Tee-hee, I would like a stupid puppy! Charlotte: * appears from behind Vendetta* So would I!
Jimmy Two-Shoes: Heloise is very prone to taking it as a compliment whenever Jimmy and Beezy are shocked by her Enfant Terrible moments. Take for example, this moment in "Jimmy in the Big House" regarding Heloise's description of Miseryville's animals-only jail.
And again in "The Terrific Trio" when Heloise explains that the monster that's been attacking Lucius was created by one of her experiments (specifically Samy going through ingesting a Jekyll & Hyde potion).
Jimmy: What kind of twisted... Beezy:...monstrous... Jimmy:...horrible... Beezy:...evil creature... Jimmy:...is capable of such a thing? Heloise: (still coyly) Oh, stop it, you're embarrassing me.
Narrator: Yes, unbelievable though it may seem, the box top counterfeiter was really Boris Badenov, that notorious No-Goodnik, that Venal villain, that delinquent demon, that... Boris Badenov: Is no use. Flattery will get you nowhere.
Done in one episode of Earthworm Jim (in which Psycrow and Professor Monkey-For-a-Head steal Jim's suit), though instead of being flattered, it just leaves Jim confused:
Psycrow: Face your doom, spineless worm-thingy! Jim: Was that supposed to be an insult? I really don't have a spine, you know...
Happens in the Code Lyoko episode "XANA's Kiss". Odd is having his ass handed to him by a polymorphic clone that keeps changing shape, currently assuming Jim's appearance. Odd tells it, "Hey, X.A.N.A., if you're going to keep changing appearances like that, do me a favor and turn into a wimp next time." XANA's response? He has it turn into a duplicate of Odd. Of course, being the Deadpan Snarker he is, Odd quickly comes up with a witty comeback to that: "Oh, no. Not him. I know his kind. Small, but tough as nails." (Unfortunately, he's right. It starts to pummel him even worse.)
Daria: "Sometimes your shallowness is so much, it actually has depth."
In South Park Stan and Kyle regularly tell Cartman he's a most unpleasant person for his selfish, manipulative schemes. He doesn't accept it OR deny it - he doesn't care. It bounces right off him.
In a non-show example, when Trey Parker and Matt Stone read that a critic called South Park "a badly animated cartoon with nothing but fart jokes for 20 minutes" they thought it was gold and created Terrance & Phillip.
In one episode of Teenage Mutant Ninja Turtles (1987) Shredder has taken April hostage and is making his get away he notices the turtles coming after him on motorized skateboards, he then sends a missile after them which they avoid we then get this exchange:
Shredder: By now they're nothing more than chunks of turtle meat splattered on the sewer walls!
April: Shredder, you're fiendishly inhuman!
Shredder: Thank you!
Aladdin: The Series episode "The Prophet Motive'' where Aladdin and co. confront Abis Mal after he steals Carpet. Abis Mal just shrugs the insult off and tells Haroud to write it down to remind him to use it against Aladdin.
Aladdin: You won't get away with this, you filthy jackal! Abis Mal: Ooo! "Filthy jackal!" Haroud, write that one down!
In "Procrastination" as Mrs. Puff announces the essay:
Mrs. Puff: Now, get out your pencils and paper, and write down the assignment. SpongeBob:[to the student next to him] Did you hear that? We get an assignment! Mrs. Puff: Everyone must write an essay on What Not to Do at a Stoplight. SpongeBob: Did you hear that? What Not to Do at a Stoplight! Mrs. Puff: In no less than 800 words. Student:[mimicking him] Did you hear that? 800 words! SpongeBob:[smiles] Yeah, I know!
[The student frowns.]
In the episode One Krab's Trash , Mr. Krabs tries to get back a rare novelty hat from SpongeBob.
Mr. Krabs: I didn't want to say this in front of Patrick, but that hat makes you look like a girl. SpongeBob: Am I a pretty girl?
Squidward: I knew you two reprobates were behind this.
SpongeBob: Yeah! We're reprobates!
Squidward: That was an insult.
Patrick: And we're insulted!
Occurs during the episode "Opposite Day", when Squidward tells SpongeBob that it's Opposite Day. SpongeBob falls for it, and dedicates his entire day to doing and perceiving everything possible inversely.
Connie: I don't care! So I'm not Steven. Maybe he's really great at helping people work out these arguments, maybe he's really patient and caring, even though it must be hard for him having to be the adult for a bunch of super-powered children!
Connie: Then act like it! Be the Gems you've been for thousands of years instead of playing this silly game.
At the end of the Pound Puppies (1980s) episode "Whopper Cries Uncle", when it is discovered that the Puppy Pound's food supply had been stolen by Katrina Stoneheart, the Puppy Pound's owner Holly tells her that what she did was very mean and cruel. Katrina responds by sobbing and stating that Holly's remark is the nicest thing anyone's ever said to her.
Nazi Colonel: I am comfortable with being called a Nazi, you think there's some other word that will hurt my feelings? (beat) Ja, think before you talk shit!
Xiaolin Showdown: While he was solving a Crossword Puzzle, Jack asks Wuya to tell him a four-letter word for "idiot". He takes "Jack" as the perfect answer, not realizing she was making fun of him.
In "Uncle Albert Alert", the final episode of Shaggy & Scooby-Doo Get a Clue!, the main villain Dr. Phineas Phibes finds out that someone has been infiltrating his organization in order to tell Shaggy and Scooby of his evil plans. He rounds up his most trusted minions and gives reasons for why he's sure they're not the mole. When he gets to Agent 2, he tells him that he can't be the traitor because he's too stupid to be a mole. Agent 2 happily replies by thanking Phibes.
The Drak Pack episode "Package Deal" had Toad thank Dr. Dred for telling him that his stupidity was exceeded only by how hideous he was.
In Miraculous Ladybug, Plagg, Cat Noir's kwami, nicknames Tikki, Ladybug's kwami, "sugarcube", which she hates. She threatens to call him "stinky sock" in retaliation, but Plagg actually rather likes the idea.
A meta example regarding Family Guy: a joke from an episode where Peter becomes a baseball manager has him trading Meg to American Dad!, with both of them acting like it's a step down. Virtually every YouTube comment on the official channel's clip remarks that Meg is actually getting a good deal, as American Dad has grown in esteem while Family Guy has undergone serious Seasonal Rot.
Played for Laughs in Mission Hill when Jim is wearing his ridiculous "Karai Pantsu" from Japan, much to Andy's chagrin. Andy asks Gus and Wally, a gay couple, if they think Jim looks gay in those pants and it goes right over their heads that he meant gay as a perjorative.
Gus: Ehh. No self-respecting gay man would be caught dead in those things!