The spell magic jar says with regards to the creature who's body the caster is possessing:
If the target has any class levels, you can't use any of its class features.
The only class feature a monster can usually have is Spellcasting, which is usually worded like (emphasis mine):
The [monster] is an Xth-level spellcaster. Its spellcasting ability is [Ability] (spell save DC X, +X to hit with spell attacks). The [monster] has the following [class] spells prepared
Nothing directly seems to imply that such a monster has "class levels". Do they?
If not, and by extension the possessor would keep the Spellcasting special trait, would the caster of magic jar now have spells and spell slots from their Spellcasting class feature and from the monster's Spellcasting?