Earthmover,
Assuming your substance is a solid, then I believe your problem can be solved by applying a well known analytical solution for transient heat conduction in a semi-infinite solid.
If the substance is initially at a uniform temperature and the surface temperature is suddenly changed, then the analytical solution will provide the temperature at a given depth as a function of time.
Alternately, if your sample is small, or thin, and is heated uniformly on all surfaces (e.g., a ball bearing suddenly immersed in a heating or cooling fluid), then an analytical solution is available by using a well known transient lumped parameter approach. This method assumes that the entire mass is heating up uniformly.
If you are heating a fluid or gas, then additional physics must be included.
I can help you with the calculation and provide the equations if you can provie a few more details regarding the geometry, material type, and method of heating.