Summarized nicely by @whitequark on Twitter:
the details of this are amazing. by pressing backspace you overflow a variable, which overwrites the return address with zero & jumps
the code at address zero Just Happens to be a valid self-modifying loop (!) that also Just Happens to jump somewhere into grub_rescue()