Got it.
I had to completely remove the PenMount driver (uninstall it from Add and Remove programs, and force uninstall the device and it's driver from Device Manager), then reinstall it. During installation there's a popup asking if you want to use it in mouse mode. I clicked no, and immediately the OSK automatically appears when it should. As long as I'm not connected by Teamviewer or VNC.
That's four hours of my life I'll never get back, or forget. Thanks @david.l for helping me troubleshoot and giving all that additional info, and @Michael.Smith for the piece of information that finally made me twig to the root cause of the issue.