Ah, that's a bit far for a cab
. Driving is really the only option. Onset is not near any public trans. If this race is on a Saturday or Sunday AM, realize that you will hit significant traffic if you are driving south, toward this area on weekend mornings. Either leave very early, or better yet, arrive the day before. It's about 75 miles +/- from Boston to Onset.
Belmont Wheelworks rents bikes; not sure about others. Try Cycle Loft (Burlington).
Where in Boston are you staying? That might give a better idea of what shops to call. Not very many shops rent road bikes. I *might* be able to help you with a shop near me, but you would have to come out to Concord to get the bike.
PM me.
2015 Trek Silque SSL
Specialized Oura
2011 Guru Praemio
Specialized Oura
2017 Specialized Ariel Sport