Thank you for the detailed reply. Vref is actually a LDO on the board, not a mere reference.
R4 is included so that the circuit will measure some voltage when a 0 ohms resistor is connected to the input (in resistance-measuring mode), as you observed.
The circuit is required to withstand +/-50V inputs when the board is not powered on. I'll put in a fuse and build and test it.
@MasterT - I'm using ESP32S3, and was thinking about a buffer as well, but the signal I am measuring will be very slow, so I thought I might get away without it.
Thanls