The ending was exactly what it needed to be. It suited everything that happened in the series, much like All Good Things was about everything that TNG had been about in its 7-year run; TNG had tons of temporal anomalies, bonding betweeen a very close crew, Q, humanity being tested...and DS9 was about hardship, overcoming adversity, loads of combat, and The Prophets. I get that this is a vast oversimplification and there's plenty I've ignored. Bear with me.
Sisko was for Bajor, that's right--which is why he had to defeat Dukat. He did that for Bajor. And the Pah-Wraiths had come up before. Remember The Reckoning? Remember the episode where Dukat tried to induct Kira into his Pah-Wraith cult on Empok Nor? Spooky stuff.