Thermal and non-thermal components of the interstellar medium at sub-kiloparsec scales in galaxies