Why can't I fight Flowey at the end of a Pacifist Run

Solution 1:

It might be that you've already defeated Flowey in a previous run. The flower remembers, and thus gives up without you having to go through Your Best Nightmare.

But if this is your first run, then it might be a glitch caused by a certain scientist.

Solution 2:

I'm guessing that, if you really saw Flowey after he stole Asgore's soul,

the game crashed, you fought Flowey in his glitched world and then saw the credits.

which is a neutral ending.

After you boot once again the game, Flowey will tell you what you did wrong or what you are missing. Follow his tips.

You might have killed a single mob / boss that you think might be "un-merciable", which sounds like you didn't from the 0 exp, or you might not have completed all of the side quests most likely.

Just listen that little flower ;) he's nothing to be afraid of ;)