All we know in TNG is that the Soyuz class were retired from service and have stayed like that for a long time.
As for Miranda class having continued production... maybe not.
Maybe all the Miranda class ships we saw were in the field and survived for 80-odd years, just internally upgraded over time.
I doubt that SF would have bothered constructing outdated 23rd century designs in the 24th century.
Upgrading existing ones in service? Yes. Building new ones with designs from a century ago? Not unless the class underwent design changes that would make it worthwhile to produce the thing in bulk.
SF already had a whole bunch of other ship classes (modern ones) to pick from in TNG era for construction. Why bother with outdated Mirandas?
It would service and upgrade them yes, but build new ones? Not with so many other classes of ships being available (and probably superior).
SF may have wanted to retain the Miranda in service... in which case, it would likely expend some resources to do a 24th century refit of the design/class to bring it into modern era (worthy of continued ship production).
That still doesn't explain why the Soyuz class was retired so early. If they could upgrade the Mirandas internally, why not do the same for the Soyuz?