Pathfinder Roleplaying Game Superscriber; Pathfinder Starfinder Roleplaying Game Subscriber
When you sustain a flaming sphere and move it to a new square, does it damage everything in its path, or just those things in the end square in which it stops?
I think you already know the answer, or at least could determine it if you consider it's a 2nd level spell, therefore not something comparable to a moving Wall of Fire.
It generally helps to read spells literally and don't apply logic to them - it states that it rolls to a square like the square it started in and does damage. It doesn't specify that it does damage along the way so it probably doesn't.