I believe that, if the Institute is destroyed, that it's the moral responsibility of the Sole Survivor to find new homes for all of the civilians displaced by its destruction. My current idea is for the Minutemen ending, with the Brotherhood and the Railroad both intact, and what I would want to do is to section off a settlement somewhere that will exist for the sole purpose of housing the survivors of the Institute, and I'll do my utmost to give them the amenities necessary for future scientific work. If the Institute must be destroyed for the sake of peace in the Commonwealth, then so be it, but if that must be, the survivors are my responsibility, as I destroyed their home.