I Think not. The Earth would have a gravitational curve in space but that curve would only deflect the light beam slightly at the outset. It would continue on essentially a straight path once it has past the major curve. The influence past that as far as curvature would be negligible and since photons do not have mass, there would be no other influence on the photons.
I suspect light would continue on in that direction for infinity.
The stuff you ask... Even as I was typing this, my mind kept wanting to bend back to saying "Yeah, but if we are talking an infinite univserse and infinite time, wouldn't it eventually wend its way back?" Had to keep reminding myself, photons have no mass.