I would like to give an educated guess based upon my own experience with a video card that overheated causing Ubuntu to fail to load because it could not determine the correct screen resolution.
When we install Ubuntu we are not required to set the screen resolution. Are we? So, how does the OS know the correct or optimum resolution of the monitor.
The OS interrogates the monitor to find the EDID. A quote from EDID Wikipedia
Extended display identification data (EDID) is a data structure
provided by a digital display to describe its capabilities to a video
source (e.g. graphics card or set-top box). It is what enables a
modern personal computer to know what kinds of monitors are connected
to it. EDID is defined by a standard published by the Video
Electronics Standards Association (VESA). The EDID includes
manufacturer name and serial number, product type, phosphor or filter
type, timings supported by the display, display size, luminance data
and (for digital displays only) pixel mapping data.
To confirm this I quote Ubuntu wiki under the heading Adding Undetected Resolutions
Due to buggy hardware or drivers, your monitor’s correct resolutions
may not always be detected. For example, the EDID data block queried
from your monitor may be incorrect.
In your case, when Ubuntu loads it cannot read the monitor's EDID block because you have not switched the monitor over to Ubuntu.
That switch box works by effectively unplugging the monitor from one machine and plugging it into an other machine. The switch that you turn physically cuts the cable from the VGA port on one machine and makes a connection to the VGA port on the other machine.
I would guess that anyone booting Ubuntu without the monitor connected would have the same problem that you are having.