Where does the DIMM temperature come from? Is the sensed temperature Tambient or Tcase?

The temperature is read from the thermal sensor inside the SPD EEPROM. There are two types of SPD EEPROM: with and without thermal sensors. Whether the SPD EEPROM includes a thermal sensor depends on the product category.
According to the SPD EEPROM specification, the temperature detected by the built-in thermal sensor represents the ambient temperature (Tambient).