Why are the particles allowed to exceed the speed of light for other media when they are not allowed to in a vacuum?
Light is represented by electromagnetic radiation which in its simpler form is mathematically described by a sine or cosine wave, classically. The classical light is built up by photons which are the quantum of electromagnetic radiation and are the mediators of any interaction between charged particles. A charged particle entering a medium immediately starts interacting with the field of the atoms and molecules in the medium by exchanges of virtual photons, which we should keep in mind.
A sine or cosine wave mathematical description is not a good description for complex electromagnetic interactions . What is a good representation for an electromagnetic interaction is a wave packet, i.e. combination of sines and cosines which can carry information by the phase and amplitude about the particle passing through
The wave packet allows a mathematical description for an information carrying bundle (particle passing at x,y,z,t) with sines and cosines but two definitions of velocity are needed, the group velocity, which is the peak of the bundle moving in space,
and the phase velocity , which is the velocity of the individual sine wave component comprising the wave packet/bundle, as it is made up by a function that expands into sine and cosine functions.
In a medium there is dispersion , and phase velocity , (i.e. how fast the sine and cosines comprising the wave packet are moving) can be different from the group velocity.
It is the group velocity in the medium that measures the velocity of light in the medium, i.e. how fast the information is given to the medium that a charged particle is passing is known to the medium with the group velocity:
The wave packets of photons exchanged between the particle and the electromagnetic field of the atoms comprising the medium and say " charged particle passing" , are slower than the velocity of the particle, because of the index of refraction of the medium. The particle itself is not directly constrained by the index of refraction ( unless it is a photon) and can move faster than the group velocity of the electromagnetic wave packets that send the information that it is passing.
As the other answers say this can generate Cerenkov radiation (analogous to sonic booms), those exchanged wave packets stop being virtual and turn real, dissipating the energy from the wave packet.
For electromagnetic wavepackets in vacuum the two velocities are the same because there is no dispersion .