Mathematical model of the temperature of resistors/heatsinks?
There is not much EE in this question, but here is a simple model that can be a starting point. There are many simplifying assumptions, such as constant thermal conductance, constant heat capacity, uniform temperature...

Power_store_heat_capacity + Power_out_thermal = Power_in_electrical

$$
MC_p \frac{dT}{dt} + K_tT = \frac{V^2}{R}
$$

T = temperature offset from ambient (K)
M = mass of resistor (Kg)
\$C_p\$ = heat capacity (Joule/(Kg*K)) = ~800 for some ceramics
\$K_t = \frac{1}{R_{th}}\$ = thermal conductance (Watt/K) = 1/(thermal resistance)

So there is no transfer function for T/V because the V-square term is non-linear.

Rewrite:
$$ MC_p \frac{dT}{dt} + K_tT = P
$$
Laplace transform:
$$ MC_pT(s)s + K_tT(s) = P(s) =&gt; \frac{T(s)}{P(s)} = \frac{1}{MC_ps + K_t}
$$

If you look in the datasheet that you linked, on the Heat Rise Chart, the thermal resistance is proportion to the slope. So it is clear that the thermal resistance is not constant as assumed by the above model. But for example, fit the 5W resistor curve to a straight line, there it gives a Kt (thermal conductance) estimate of 5W/75C = 0.066 W/K.