I would not rely on the commuter rail. It is not a very reliable means of transportation and it has a very limited weekend schedule. Definitely rent a car.
Have you bought your plane tickets yet? You could also fly in to Hartford (BDL), stay outside of Boston closer to your race and drive to the commuter rail / T for the days you want to explore the city.
Everything here is "highway robbery"