Oh thanks a lot for the help trying to locate the bug! And I'm sorry it happened to you.
But that's really weird... Did you lose only the exp progress to the next level, or did your characters' level go back? It seems to be the former. Also, it did happen to everyone, and not just Shida, right? Did the battle screen display your gained exp as negative, or did you only look at it in the menu later and saw the number was smaller?
If I'm not mistaken, if I tell the engine to jump you to a certain level, it will you make the character's level exatcly it, and their progress to the next level should be reset. The weird thing is, this should only happen when you use the debug window to jump to a certain chapter, which levels up the 3 main characters. Shida isn't involved in the main story, so this shouldn't affect him either way.
It could be related to Attentive Goggles, but it has the simple effect of multiplying the exp you gain by 1.1 (so 10% more than normal). You actually losing exp after battle is REALLY weird, and I don't remember there being any status effect in the game that affects your exp gain aside from being dead (by default, it multiplies your gained exp by 0, which I manually removed anyway since this is a tough game and I don't want sacrificed characters to gain nothing from bossfights).
The only other event that can mess with a character's exp (that I can remember) is when they rejoin your party. RPG Maker gives me the option to initialize their data, meaning return to their default level (Lianna would be 1, Jeanne 4 and Shida 9). It's possible there's an event somewhere where a character rejoins your party and I accidentally left the initialize option marked. (note: you know a character has left your party when you open the pause menu. Sometimes I just disable followers for special events or cutscenes, which is only a visual thing)
When you change chapters by sleeping on a bed, the game runs the "recover all" code, restoring everyone to full health and healing any status ailments. And when you interact with it in the late game it only uses triggers to switch between day and night. So I don't think the bed is involved (the code for it is very short too, and I just double checked it)
If you want to keep trying to find it, those are all the leads I have. I'll have a good, long look at the events this weekend when I have the chance. Thanks again for your dedication and help!
(Btw, what do you mean quantum table? Did I forget a joke? xD)
edit 1: tried cheating to get my characters to a high enough level and equipped some with the attentive goggles. They still gain exp like normal. So I guess it's not related to their exp curve or something.