To unlock the Dream Race, you first need to unlock the Moonlight Circuit. That in turn requires finishing in first place across the Mercury, Venus, Jupiter, and Saturn Circuits.
Once you have conquered all four, the Moonlight Circuit opens up, and clearing it grants access to the Dream Race. It sounds demanding, but it is very doable, even if, like many players, you find the swimming events a little awkward.