If you have SSH enabled you can login via SSH, edit /boot/config.txt and reboot.
If you have a keyboard attached to the Pi you can try a blind login and shutdown after hitting Control+Alt+F2 to open a CLI (or just Alt+F2 from Raspbian Lite with no GUI).
Otherwise, pull the power, hope you don't corrupt anything, and edit the file on your main PC.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?