"The Kagari" of Moon is an entirely different entity. It is noted that there are many versions of Kagari that can exist, and that they are all manifestations of the "star's energy".
The Kotarou in Moon is the Kotarou that results from the multiple of possibilities in the heroine routes. This "moon" is a space that is not unlike the Illusionary World (Clannad), it is a place not entirely in reality.
This Kotarou comes from all possible ends - some ends not even explored in the heroine routes. Example, he becomes husband of Kotori, he becomes a hunter of Gaia, he marries some unknown woman, etc. What is common, and in fact what this Kagari is concerned with, is that one way or another the Earth is doomed to die.
Take the heroine routes. There are two main ways that the world would die, Kagari initiates Ruin, or she is killed, and the world is ruined anyway through the wasteful acts of humans. The former happens in the Sizuru route, with the latter happening in some degrees with the other routes. Lucia route explains most of all how this second scenario comes about (the simulation).
Thus, the theory of Kagari is unattainable and unexecutable. No matter what, no matter the conditions, it seems there is no hope for Earth. At least in the "here" of Moon, the Earth has ended. There is no energy left for reevolution, or even ruin.
Recall, this kagari is a different manifestation. It is formed from the Moon instead of the Earth, formed from the energies of our satellite.
Halfway down, this Kotarou, thinking all is lost as there is really no way of getting that last 2% completion of the theory, just writes down a note near the theory.
"I hope we meet again."
This comment is significant, at least to the eyes of this Kagari. It is a sliver of hope, and one she takes, because it is then "proven" to be feasible by the theory.
What does this mean? "Let us meet again." How could "Kotarou" meet "Kagari" again? What effect would this have on everything?
Perhaps this Kagari believes that Kotarou has the power to change everything. As seen in Terra, he has the capability to be of both Gaia and Guardian. He is a superhuman as well as having the necessary psyche to summon demons.
By the end of Moon, the theory is executed.
Slivers of Aurora, flittering towards the Earth from the Moon.
"My selfishness, I am sorry." "I cannot just keep hoarding the energy eternally" (or something of the same, can't quote it due to time) this is what this Kagari of Moon tells Kotarou, once he is swept away in the arms of Aurora. Aurora, the spark of life.
Initiator of Ruin.
And Re-evolution.
To a world that is ruined, the Moon sends its last vestiges of energy. Energy it has contained since it was formed, retained from its creation with the Earth.
Carrying with it the single hope - of rewrite.
The theory will be executed, in an again primordial earth. From the smallest bacterium to homo sapiens. History will occur right as the theory states.
And in this theory, a "Kotarou Tennouji" will again exist. He is the Key. He must overcome his mistake - the "blank spot" in his memories, so Earth will at least be saved.
The conditions are set for Terra. Kotaoru will light the way to the future, a future of hope.