He didn't travel into the future. It's revealed in BBS that the Lingering Sentiment Spoiler is the lost thoughts and feelings of Terra residing within his discarded armor after his body is stolen by Master Xehanort. Since he's just a suit of armor, he doesn't feel hunger or tiredness so chances are that he probably waited there at the Keyblade Graveyard after defeating Xehanort until Sora came.
What GS said. Spoiler It's nothing but his lingering sentiments, the emotions that were left behind in his armor after Xehanort absorbed him. The Battle in KH2FM is not relevant to the storyline at all... Some of the things he says to Sora sound odd...
Even though that battle was non-canon, Spoiler due to Sora's destiny as outlined in Coded, Sora and LS will cross paths in a future. More than likely to fight Xehanort to reclaim Terra's body.
SPOILER!SPOILER!SPOILER!SPOILER!SPOILER! i think they will in Kh3...in recoded's secret ending, Yen Sid said that Xehanort had come back. so sora will probably fight him and reclaim terra's body. who knows? maybe sora will fight along side Lingering Sentiment
I veiw it a bit differently than G_S but along the same lines Spoiler Durring Terra's final fight Terranort says "Your body submits. Your heart succumbs. So why does your mind resist?" in response to Terra's last stand. So Terra's armor would be controled by Terra's mind alone. Terra's mind being his soul. I can support that more if anyone wants to challenge it, I'm just feeling lazy.
Actually, that was a very good idea. I've thought along those lines, but never really went too much into it. This theory's backed by the fact that LS spoke to Sora