Sound quality is one thing, and the JP version of Castlevania 3 may be the best music ever heard on the NES in terms of quality.
But Capcom reigns in composition. From the very first game, Megaman had incredible compositions, while CV's tracks, while catchy and hard-hitting, were mostly short and repetitive. CV1 has two amazing compositions (Walking on the edge and Heart of Fire), but Megaman 1 basically has only one stinker (Gutsman's Stage) and the ending theme is almost too good for 1987. Megaman 2's Dr. Wily theme alone has better composition that all of CV2, easily.
The main level themes in that game are even better than in the NES games. But on the whole, it can't touch Megaman 2 or 3.