In my opinion, Rogue Squadron has more replay value. Once you complete missions, you can go back and try to get better times, more kills, etc. These lead to higher ranks and more medals. Getting all bronze medals unlocks Beggars Canyon, silver unlocks The Death Star Trench, and gold unlocks The Battle Of Hoth. That's 19 missions in total, plus a few secret ships to unlock.
Racer has 25 levels in total, and completing a race in a certain time unlocks a new pod. However, once you have completed a race, you can't go back to win more credits, unlock pods, etc.
If you want a game that you want to play again and again, get Rogue Squadron. If you like high-speed racing in the Star Wars universe, get Racer. But, these are my own opinions. It's completely up to you.