Seismic characterization of red giants going through the helium-core flash