You may be able to use a quality USB KVM switch. This will allow using one set of input (and output, if you choose) devices with two physical computers. Check the reviews and manufacturer website before purchasing any KVM switch. This may or may not work due to the driver issue. It shouldn't affect latency at all if the KVM is only passing the connection, and not doing any additional processing on it.
You can do manual switching using Bluetooth, but I find bluetooth switching to be cumbersome. Drivers shouldn't be an issue with a standard bluetooth interface, but keystroke latency over bluetooth might be a problem. I never found a bluetooth keyboard enjoyable to use due to keystroke registration issues.
Without additional hardware purchases, you can remotely log into the Ubuntu machine from the Windows PC with VNC or SSH. This can be configured to work over the LAN. You will not require any internet based solutions.
You can install VNC Server on Ubuntu Desktop with the package manager. You can access that VNC server with a VNC client on Windows. TightVNC is a good one. VNC should not be exposed to the internet. This would be my personal preferred solution to work with Ubuntu Desktop. There are other remote agents available other than VNC, but VNC is the most common. VNC latency will be variable, but can be improved if you give up some of the graphical fidelity. There are probably tweaks available in the documentation to improve latency as well.
If you aren't working with Ubuntu desktop, or prefer command line, there are many guides on installing and setting up SSH on this forum and elsewhere on the internet. Here is one. You can SSH to Ubuntu directly from PowerShell. SSH over a LAN connection shouldn't generate any perceivable latency.
ssh -Y ...you will also be able to start and run GUI software from the shell prompt, e.g. this works nicely on a Ubuntu-based Raspberrry Pie 4 ssh'd from a Ubuntu 20.04. – Hannu Aug 29 '20 at 15:59