A flag means that you have completed the level, but that there are still parts you have yet to explore, and likely orange box items you have yet to collect. The crowns indicate that the level has been entirely explored.
Chat with our AI personalities
They show if Dixie or Kiddy completed a level (Dixie being pink) and (kiddy being light blue). And the yellow one is to show if you have the DK Coin in the level yet.
If there is a green flag on the Subspace Embassy stage that means you have not 100% explored it.