Similar scenario here. I'd been running a 2018 mini running Mojave using a super convoluted connection for the main screen (Radeon RX 580 in OWC eGPU -> mDP -> Gefen adapter -> DVI -> KVM -> NEC PA271Q), and an LG 27UN880-B via native HDMI for the second monitor; this setup worked fine, for the most part.
Today I updated to Monterey 12.3, and bizarrely only the convoluted main connection works; I cannot get the native HDMI to show up under any circumstances on this 12.3 install (it still works fine on the 2018 Mini under Mojave, as well as an M1 Mini that is still running macOS 12.21). Even if I unplug the eGPU entirely on boot, the native HDMI output sends no signal at all (it reverts to a "headless" output).
What's even more bizarre is that I had actually done a "test run" of this Mojave -> Monterey 12.3 upgrade onto a cloned external USB3 drive last night, and both monitor outputs were working just fine. Things only got flaky most of the way through the same upgrade performed on my internal drive. Indeed, before this upgrade, I always had to turn the HDMI monitor on to reboot, as the startup and login always went to the HDMI output, only sending signal to the eGPU after booting. Indeed, during the upgrade, the install progress was only displayed on the HDMI screen, but then, about 10 mins before the update completed, display switched to the eGPU screen, and has been stuck there (exclusively) ever since, refusing to even see the main HDMI output.
I'm tempted to re-install Monterey, but with the main screen disconnected / only HDMI connected during install, though I don't want to be stuck on the HDMI screen (I need the KVM functionality for primary display, but also need the second monitor for 4K work).
System Information does appear to "see" the built-in output, but doesn't actually send any output.