it's much more reasonable and trivial on lower quality monitors but if one of the two PCs is for gaming you're going to want 4k at at least 120Hz which, last I checked, didn't exist (or was very expensive). You also might have a hard time finding one that takes DisplayPort in, which is preferable for Linux.
Personally I just run the USB devices into a $5 USB A/B switch and manually change the inputs on the monitor.
60hz is luxury too (for console lol). There are a lot of things you don't "need" for gaming that are "luxury" for example a modern pc... I at least will not play on the refresh rate level from the 2000s on a current year pc and monitor i spend my money on to specifically get higher fps and noticable better experience.
Personally I just run the USB devices into a $5 USB A/B switch and manually change the inputs on the monitor.