If it wasn't for Sky Canyon (I couldn't beat it), I'd say Sonic CD and Sonic Advance 2 are around the same for me. Well, I personally prefer how Sonic Advance 2 controls, but both games to me have some pretty lousy level designs.
Sonic CD
This game is a bounce simulator cause you're bouncing all over the place on popping spheres, wacky workbench, and that oddly done pinball part. Metallic Madness is a pretty boring level.
Petpeeve, but Sonic CD is too 90s neon garish for me with the colors. Don't really care for it.
Sonic Advance 2
Too many oddly placed spikes and enemy placements. Sky Canyon has too many deathpits and that soured my run of it. Unlike CD however, I can a actually say I liked 2-3 levels from it apart from the 1 I like in Sonic CD.
Bosses
Sonic CD wins here, but I still feel the bosses are kinda jank. Advance 2 bosses are just the same thing over and over.
Collecting stuff in both games is a pain, but I haven't played Sonic Advance 2's special stage. I did play Sonic CD's and it is the worst one I've played. You have a lack of control/steering on Sonic and you float as if you're balloon filled with helium. The timer being really short doesn't help either.
If I were to pick? I'd rather go with Sonic Advance 2 as it looks better and is just more fun to me.