Wow! Terrific episode! I loved it!
I think that the intention of the episode is that this is what "always" happened-- Gallifrey was preserved; the Doctor just didn't know it until now. As for what everyone remembers, this is my understanding based on the episode:
The War Doctor (Hurt) does not remember that Gallifrey was saved, or meeting Tennant's and Smith's Doctors. At the end of the episode, he regenerates into Ecclestone, and at that point he believes that he used the Moment to end the Time War for the sake of the universe by wiping out both the Daleks and the Time Lords.
I am not sure whether he even remembers the Moment's conscience appearing in the form of Rose/the Bad Wolf, because it would seem that otherwise he would react differently when he met her.
The Tenth Doctor (Tennant) remembers more about the events of this episode, perhaps because he was not pulled out of his own time stream until later on? (Smith visited him as opposed to yanking Tennant out of place)
Anyway, we know that Tennant remembers everything that happened in 16th-century England, because in "The End of Time," he mentions marrying Elizabeth I. Also, he remembers the fez coming out of the portal followed by Smith's Doctor, because Smith recognizes the appearance of the portal as his "cue" to toss the fez in and jump through shortly after. He remembers these events from his previous regeneration.
Note that when they toss the fez back through the portal and it seemingly vanishes, neither Tennant nor Smith understand what happened to it. That's because it landed with the War Doctor, and he forgot about it when he regenerated into Ecclestone.
This means that during "The End of Time," Tennant's doctor knew that one of his future incarnations would be Matt Smith. Perhaps it was on his mind when he mused about how regeneration still feels like an ending, because "some other fellow goes sauntering off..." But there is precedent for the Doctor knowing about one of his future incarnations-- in "Time Crash," Peter Davison met David Tennant, and he must have retained his memory of those events, because that's how Tennant was able to solve the problem.
I'm less clear about how much Tennant's Doctor remembers about "The Day of the Doctor," but he does forget at least some of it, because in the final scene in the museum, he gets Smith to tell him about his death on Trenzalore by pointing out that he won't remember it, so "you might as well tell me."
It's possible that Tennant doesn't remember anything after he left 16th century England. Maybe he also remembers helping to solve the Zygon conflict. But he must have forgotten about going back to help the War Doctor save Gallifrey, because otherwise Smith would already know that it was saved, and he still thinks he killed all of the Time Lords. (He says as much to House in "The Doctor's Wife.")
Finally, the Eleventh Doctor (Matt Smith) apparently retains the memory of everything that happened in this episode-- that Gallifrey was possibly preserved (okay, we all know it was!), and that the War Doctor did not break the promise he thought he broke. This brings resolution to a storyline that has been developing for eight years (and peace for the Doctor after what, 600 years or more?)
I would also note that the Eleventh Doctor had good reason to think that the plan to save Gallifrey would fail, as all of the time from Hartnell up to Smith was not quite enough for the TARDIS to run the calculations for preserving the planet. Thankfully, unknown to him, Capaldi showed up with the finished calculations.
All of this is, of course, my own rationalization; it is probably easier to say "timey-wimey" and be done with it. Just offering this in case it helps someone else to make more sense of the episode. But if anyone has corrections or clarifications, they are welcome to add them!
-- Kolrad
I think that the intention of the episode is that this is what "always" happened-- Gallifrey was preserved; the Doctor just didn't know it until now. As for what everyone remembers, this is my understanding based on the episode:
The War Doctor (Hurt) does not remember that Gallifrey was saved, or meeting Tennant's and Smith's Doctors. At the end of the episode, he regenerates into Ecclestone, and at that point he believes that he used the Moment to end the Time War for the sake of the universe by wiping out both the Daleks and the Time Lords.
I am not sure whether he even remembers the Moment's conscience appearing in the form of Rose/the Bad Wolf, because it would seem that otherwise he would react differently when he met her.
The Tenth Doctor (Tennant) remembers more about the events of this episode, perhaps because he was not pulled out of his own time stream until later on? (Smith visited him as opposed to yanking Tennant out of place)
Anyway, we know that Tennant remembers everything that happened in 16th-century England, because in "The End of Time," he mentions marrying Elizabeth I. Also, he remembers the fez coming out of the portal followed by Smith's Doctor, because Smith recognizes the appearance of the portal as his "cue" to toss the fez in and jump through shortly after. He remembers these events from his previous regeneration.
Note that when they toss the fez back through the portal and it seemingly vanishes, neither Tennant nor Smith understand what happened to it. That's because it landed with the War Doctor, and he forgot about it when he regenerated into Ecclestone.
This means that during "The End of Time," Tennant's doctor knew that one of his future incarnations would be Matt Smith. Perhaps it was on his mind when he mused about how regeneration still feels like an ending, because "some other fellow goes sauntering off..." But there is precedent for the Doctor knowing about one of his future incarnations-- in "Time Crash," Peter Davison met David Tennant, and he must have retained his memory of those events, because that's how Tennant was able to solve the problem.
I'm less clear about how much Tennant's Doctor remembers about "The Day of the Doctor," but he does forget at least some of it, because in the final scene in the museum, he gets Smith to tell him about his death on Trenzalore by pointing out that he won't remember it, so "you might as well tell me."
It's possible that Tennant doesn't remember anything after he left 16th century England. Maybe he also remembers helping to solve the Zygon conflict. But he must have forgotten about going back to help the War Doctor save Gallifrey, because otherwise Smith would already know that it was saved, and he still thinks he killed all of the Time Lords. (He says as much to House in "The Doctor's Wife.")
Finally, the Eleventh Doctor (Matt Smith) apparently retains the memory of everything that happened in this episode-- that Gallifrey was possibly preserved (okay, we all know it was!), and that the War Doctor did not break the promise he thought he broke. This brings resolution to a storyline that has been developing for eight years (and peace for the Doctor after what, 600 years or more?)
I would also note that the Eleventh Doctor had good reason to think that the plan to save Gallifrey would fail, as all of the time from Hartnell up to Smith was not quite enough for the TARDIS to run the calculations for preserving the planet. Thankfully, unknown to him, Capaldi showed up with the finished calculations.

All of this is, of course, my own rationalization; it is probably easier to say "timey-wimey" and be done with it. Just offering this in case it helps someone else to make more sense of the episode. But if anyone has corrections or clarifications, they are welcome to add them!
-- Kolrad