If you fell better, you can interpret the end of the first Super Mario Galaxy as the end of the Universe followed by the beginning of a new cycle which, according to Rosalina, it is not necessarily tied to the old one. As such, both games depict the same events, similar though different, as they pertain to different cycles.
However, the truth is that Nintendo don't give a crap for the storyline. I wouldn't be surprised if they decided to make the continuity confusing only to end any expectation from the fans.