You can't officially unlock Dr. Eggman in Sonic Free Riders. There's no legitimate way to add him to your playable roster.
That said, there's a glitch in the game that lets you use him, but only within Story Mode. So if you're determined to play as Eggman, that's the one quirky loophole available.