The Titan novel Orion's Hounds has Riker musing about how he's fifteen years late to explore this section of the galaxy and there was supposed to be a long-term exploratory mission for the Enterprise-D, but that the ship got called back further and further into the heart of the Federation (Check on the SS I-can't-spell-it, the plague on Styris IV, the Ferengi's theft of the power converter, etc) and the original mission was scrubbed.
That's sort of how I see it. Somehow, I suspect that Starfleet's original mission for the ship was either honorary, or scrubbed, because it fell in conflict with its existence as the flagship of the fleet. It would seem that diplomatic escorts, faction mediations, crisis aide, and general inter-Federation events & concerns were the primary uses of the ship, in addition to the standard ship mission of responding to destress
I prefer to think that the mission was never officially scrubbed, since even in season seven, the ENT-D crew are still charged with things like cultural exchanges with new lifeforms, like in Liasons, & Federation membership requests, like in Attached. Granted, this is hardly exploration of unknown new lifeforms & civilizations, but it still seems consistent with earlier seasons
Pen Pals, Transfigurations, Where Slience Has Lease, The Royale, & even Justice, seem to be in standing with the idea that they were still occassionally left to exploration, charting, or scientific survey
Darmok, First Contact, The Hunted, & Lonely Among Us, were indications that they served as contact to newly discovered civilizations, & membership applicants
It seems that that though it may have been otherwise initially, their mission to explore the unknown was only applicable, as it's mainly in concert with the fact that it's all of Starfleet's primary mission, & therefore conditional to the majority of ships in the fleet, at one time or another