After reading countless ending interpretations from twitter and reddit and mdl, this is the one that actually made the most sense. It's a combination of various people's interpretation.

Ziqi (yes his real name is Ziqi in the modern world based on the medical records) actually transmigrated to the book during his surgery after he made his wish. That's probably why Miaomiao got pulled in at the same time because of his 2nd wish to let Miaomiao know of his hidden feelings. Unlike Miaomiao, he didn't have his modern world consciousness, but all throughout we saw hints that he was from the real world - swing, snow, shadow. 

Ziqi regained his full modern world consciousness when he had the talk with his younger selves. That's when he realized he was actually the author, being actually the author, currently under surgery. That's why when he confessed to Miaomiao of being Fu Zhou on top of that stairs, we get the flashback of his decision of finally doing the surgery after reminiscing their high school days because he finally remembered. That's why he confessed all his books were written for her because he finally remembered. 

And that's why when Miaomiao woke up (and Ziqi woke up from his surgery), the novel got rewritten to have a happy ending. Because Ziqi experienced everything Miaomiao experienced and is no longer afraid of endings. He actually remembered their whole experience, otherwise why would he randomly rewrite his first novel (the only answer is he now has a reason to after the ordeal he went through with Miaomiao). 

That's why the foreword contained the lines of 100%, in reference to Miaomiao's quest, because Ziqi actually saw the 99% formed by the dust demons in the mountains. He had been stuck at 99% for a while so he must have wondered because he probably thought he had already loved Miaomiao so much so why did it only turn 100% at the end, so the acknowledgement in his rewritten novel was in reference to that because he finally found his answer. 

And that's why on their meeting on the book signing conference, he called her Miaomiao affectionately when he hasn't seen Miaomiao in years (presumably ever since Miaomiao transferred schools). If he hadn't transmigrated, he would have called her by her full name - Ling Miaomiao. But he said it exactly the same way book Ziqi said it, which is the last evidence that his memories from his time as book Ziqi is intact. 

So pre-surgery Ziqi made his three wishes, and he and Miaomiao got pulled into the novel at the same time. Miaomiao had her modern world consciousness. Ziqi didn't at first, but he regained it in the end. When they both woke up, they have their memories intact. Miaomiao's is hazy at first, but she will remember/already remembers based on that smile at the end. And of course Ziqi remembers, as written above.

A complete full circle and a very happy ending ㅠㅠ Okay I'm off to rewatch the last episode with this in mind ㅠㅠ

? I didn't realize this was an "interpretation". They made it clear that you only gain your memory back when you are near someome., hence him starting to be getting this childhood game memory back when his sister was possessed. So he didn't get his Real World memory back until he.was confronted by his past "selves". She fully remembers when she sees him again at the signing.

yes same here it's actually a very happy ending. The only plot hole is how the novel was popular at the first place if it had bad ending at first. 

 NataliaSugiarto:

yes same here it's actually a very happy ending. The only plot hole is how the novel was popular at the first place if it had bad ending at first. 

Popular because he was already a very good famous Author with lots of well written novels. The question was why a really good author wrote a new bad book, but it's explained it's actually his first book as a teenager. 

So in real world, fu zhou is well known not only because of catching demons? But also another novel? Because from what i've seen, his most popular work is catching demons which was sad ending. Also if he has another better novels with happy ending that also inspired by miao2, why do they got pulled in his bad ending novel instead of another good ending one ?