I have to eat my pride and ask for help. I can't find the secret exit in M-Ghost and I've searched every nook and cranny, finding the three medals and many green mushrooms, but not the red flag.
Hmmm... that one was pretty simple but I may over complicate it if I explain.
Midway through the stage you get to a choice of three doors.
When you take the left you come to a room where three routes are all barred off by blue blocks.
Near the entrance here are three upside down yellow P blocks which you must hit in the right order.
You'll probably remember this area as once you've chosen the correct passage, you gain access to a hidden nook in the ceiling where the third star coin is.
You need to hit another P block to unveil the star coin, what you haven't been noticing however is off-screen the block has also unveiled a hidden door to the right.
You exit here to get the red flag.
EDIT: Damn it Peff you said it better than me in far fewer words