If I wanted to draw a parallel between a Cave Story game and a Sonic game, I would have picked out Sonic 3 and Knuckles. Instead of a little planet like we see in Sonic CD, S3K actually has a floating island that is uncannily similar looking to the one in Cave Story (probably influenced Cave Story), and a doctor stealing a precious magical gem (the master emerald). There's even a plot point that involves the island falling to the ground in S3K, and one of the goals is to restore the island's ability to float, which also I suspect may have had some influence on Cave Story. Also, in most endings for S3K, after you defeat the final boss, you start falling from the sky, and one of your friends (Sonic or Tails, depending on who you're playing as), catches you with the plane.
Not sure why you picked Sonic CD instead, the parallels are far more scarce.