The ghost feature lets you race solo against your best time, sometimes being a pretty good motivator. But the Wii U Mario Kart 64 version can't actually save any of your ghost data, because normally it would save that to the N64 controller pak memory card. The same problem was present with the original Wii re-release.
Nintendo has been unwilling so far to provide a work-around, and it might mean that any N64 game that absolutely requires the memory pak might not be able to work properly unless Nintendo modifies the game. Until then, you'll have to remember your time and race against an imaginary ghost instead.