Probing supernova shock waves and neutrino flavor transitions in next-generation water-Cherenkov detectors