Best way to switch electronically between different voltage sources for measurement
There are different solutions for that.
The first and easiest is to use relays as you started but to avoid having 1500VDC right to the relay, you can use a voltage divisor beforehand, so you'd have several voltage dividers for each channels.
Bear in mind that you need to make sure your resistor is rated for this voltage, to avoid arcing. You also need to make sure your circuit is safe, probably requires some sort of galvanic insulation.
The second solution is similar but instead to use relay, use analog switches, which might or might not be better given the use case. Analog switch IC becomes cheaper if you have a lot of channels, they also don't wear out like relays, but usually handle voltages only up to 5/7 VDC which means at max input voltage, you need to have the highest divider at that max value. Means the input voltage to your sense circuit, depending the design, can be a few mV, which makes the sense circuit a bit more complex. They might also introduce tiny bit of offset and current but it is usually negligible. Given their &quot;low voltage&quot;, more care needs to be put to design the channels to make sure it does not exceed, which is not a problem with relay.
Those have drawbacks though, for one you will draw more current for sensing, as all voltage dividers will constantly draw a bit of current, and this needs to be considered whether it is an issue.
Bottom line, perhaps using several voltage dividers before the relay would be the easiest solution and allow you to use a cheaper relay with lower-rated voltage.
On the sense side, consider using an instrumentation opamp before the follower amp, as those are much better for this kind of application.
You will need some common ground between your measurement device and what you measure. It can be a floating ground. Without it you'd get common mode noise that would give you bad measurement or could even burn out your circuit, especially if you use switched supplies. I'll add a schematic.
If you need insulation, the best way is to put an I2C isolator between your ADC and  your MCU, and use an isolated DC/DC supply, there are like 5V/5V, 3.3/3.3, etc...



simulate this circuit &ndash; Schematic created using CircuitLab
Couldn't finish the circuit as it requires registering, but after ADC -&gt; I2C isolator -&gt; MCU
Note that instrumentation op-amp has very little draw current, which allows using some fairly big resistors in the voltage divider before having linearity issues, in turn reducing the draw current from the voltage being measured and reducing the heat dissipation on the resistor divider. However, instrumentation opamp usually isn't enough to drive an ADC properly, that is why you have a follower opamp afterward.