How to receive 40V-DC to 100V-DC range analog output into 9V-DC to 24V-DC analog input?
I would divide by 5 with a voltage divider and make the final correction in firmware. Is it really this non-linear?  If yes, use Excel curve fit, assuming that you have floating point available in your firmware.

Resistors, 1/2W, 200V. In stock at Digikey.
SFR16S0004022FR500
SFR16S0001002FR500

This assumes that your input impedance is high. If it is low and predictable, you can adjust the voltage divider appropriately. If it is not predictable, I would use a high-voltage op-amp.

The power dissipation in the 40k will be 0.16W. You dont want to go anywhere near the rated power of a resistor, 2X margin or more is preferred. My father taught me 40+ years ago, the rated power is just before it will catch on fire (exaggerating somewhat).