How can red supergiants be cooler than dwarfs of the same spectral type?
The HR diagram has many forms. There is no one to one relationship between temperature, colour and spectral type that is true for stars of all surface gravities and metallicities.
Spectral type depends on temperature primarily but spectral features can also be weaker or stronger at lower surface gravity or with changes in metallicity.
For example, the Handbook of Space Astronomy and Astrophysics has two tables of spectral type Vs temperature relationships, one for dwarfs and one for giants. And indeed the M-type giants are cooler than M-type dwarfs of the same subclass by ~200K.