Of course, The Producers had a whole host of them, including Funny Boy (Hamlet) and King Leer. The biggest examples I can think of, and most integral to the plots, would be the onstage/backstage comedies Noises Off and and The Play That Goes Wrong that are actual productions of Nothing's On and The Murder at Haversham Manor, respectively.
Easily my favorite is "Nothing On" from "Noises Off" except of course "Pyramus and Thisbe" from "A Midsummers Night Dream" because Shakespeare does it best.
I mean, no one else has mentioned it, but "Springtime for Hitler" (in either of its incarnations) was entertaining in a way that the real World War II so wasn't.
I love both of the "shows within the show" in Phantom of the Opera (Il Muto and Don Juan Triumphant). I wish Andrew Lloyd Webber would complete them as independent pieces!
==> this board is a nest of vipers <==
"Michael Riedel...The Perez Hilton of the New York Theatre scene" - Craig Hepworth, What's On Stage
Bombshell and Hit List from SMASH come to mind, although both of them found their way to a real world stage and may yet return.
Oddly enough, Hit List is more complete and has a working libretto, but is less likely to be restaged due to rights issues. Bombshell, which is still in development, has not revealed the identity of the librettist currently (and allegedly) working on the project.
The Victorian melodrama and olio numbers that make up the show presented on the Cotton Blossom in Show Boat.
The parody of the ballet Scheherazade in On Your Toes. Likewise The Slaughter on Tenth Avenue ballet, which is also presented as a show within the show.
The Small House of Uncle Thomas from The King and I.
I haven't seen R&H's Me and Juliet but the show is about the production of a long-running musical called Me and Juliet and alternates between that show onstage and what's going on backstage and around the theater.
The Treasure Hunt TV show in How to Succeed was very, very funny in the original production.
BenjaminNicholas2 said: "The Enchanted Nightingale from Drowsy Chaperone. When they start that number at the top of Act II, I always cracked up. Brilliant."