But shouldn't he be in a different timeline/reality? Some of them surely ended up mostly the same as the main timeline, but the 2014 one and the 2012 avengers realities got changed, and based on the rules of the movie, he would be in a new timeline. Unless I suppose, he came back to see them off?
It'll probably get cleared up within the next week or two, but honestly it's the only small issue I actually had with their time travel logic.
Well if we take the whole "quantum physics" angle of the time travel in this movie into account, one possibility is that timelines are subject to a form of entanglement wherein changes in any point in time can result in either a complete divergence from the origin timeline or an eventual reintegration into the origin, but you can't know which it is until the timeline plays itself out. If we accept the core premise in this movie that the events before the actual time travel takes place are immutable and a necessary cause for anything that happens during these trips then we can presume that divergences only occur if the events of the changed timeline and the events of the original timeline are contradictory. Thus, Loki escaping with the Tesserect would be an entirely new branch while Cap settling down with Peggy while completely divorcing himself from any history with the principle actors of the time travel would become a successful reintegration.
Naturally all this is just speculation using a rudimentary layman's interpretation of quantum mechanics but it's an example of something plausible enough to work in a fictional story.