The most versatile interface is HDMI, as you can get an adapter to it from most things. It's also what all monitors come with. Some now also come with displayport (possibly over USB-C on newer ones).
If you have a monitor with HDMI, then you'll just need the right adapter for each machine. For the macbook and the Surface pro I think it'd actually be the same adapter (something like https://www.apple.com/uk/shop/product/MUF82ZM/A/usb-c-digital-av-multiport-adapter although cheaper ones are available - I use a startech dock with all sorts of ports alongside HDMI). For the iMac I think you'd need a mini displayport to HDMI adapter.
A few complications:
First, my MacBook is quite old, so doesn't have a modern USB-C/Thunderbolt 3 port, just the old style Thunderbolt 2, so I need different adapters for the Surface and the MacBook. But that's not a big deal - such things are reasonably cheap.
Second issue is the number of ports on each device. My wife's desktop setup is a Mac Mini connected to two monitors via HDMI. But because the Mac Mini only has one HDMI port, the second monitor is connected to the Thunderbolt 2 port via an adapter.
From further research, I *think* what I need to enable a dual monitor setup with the Surface is DisplayPort MST - then I can connect up to five (apparently) daisy-chained monitors using a single USB-C to DisplayPort from the Surface.
Slightly more complicated with the MacBook because I don't think it officially supports DisplayPort MST. I might need to connect the MacBook to the monitors via a hub.
However, I think using the iMac as a single display for the Surface will be relatively simple - just need an appropriate USB-C/DisplayPort to Thunderbolt 2 cable. Won't be as good as a dual monitor setup, but at least I'll have *one* screen of a size that's reasonable to work on (21in as opposed to 13in).