Been meaning to share this somewhere for a while, but a year ago while streaming TTYD on actual hardware, I managed to survive an attack at 0hp. I was killed by the first hit of a Boomerang Bros' boomerang attack, and then the return attack and the next two attacks missed me due to the effect of a Close Call badge. I was able to take a turn as normal afterward, but I leveled up at the end of the battle which refilled my health, so I don't know what would have happened if the battle ended with me at 0hp.
https://www.twitch.tv/robinproblem/clip/RelentlessDarkTubersPogChamp-RrV_Nsb20308uiSG
That glitch was looked into a little bit a few years ago. I'm pretty sure nothing really came of it unfortunately. If you don't level up, Mario exits the battle with 1 HP.