For your example (the surface temperature is lower than the soil temperature), heat will be transferred from the soil to the surface by conduction, which is basically diffusion of heat. This is a slow process. So there is generally a lag-time between when a specific temperature is observed on the surface and when the same temperature is observed in the soil at a specific depth. The depth at which the surface temperature affects the soil temperature is proportional to the amount of time the surface experienced that specific temperature. Therefore, diurnal (daily) temperature fluctuations are generally observed at shallow soil depths (centimeters to 10s of centimeters). Average seasonal temperature fluctuations are observed at deeper soil depths (on the scale of meters). On the scale of meters, below a certain depth, the soil temperature is constant and reflects the average annual surface temperature. On a scale of tens and hundreds of meters, the surface temperature generally does not have as much of an affect on soil temperature and there should be a linear increase in temperature with depth due to the conduction of heat from deep in the earth. However, these deep temperature profiles are usually not linear due to differences in the thermal conductivity of different types of rock and groundwater flow effects. Some colleagues of mine specialize in the use of deep temperature profiles to say something about the groundwater flow regime. You can usually determine the direction of groundwater flow and sometimes even estimate flow velocities from these non-linear temperature profiles. Temperature profiles have also been used in paleo-climate studies to reconstruct past average global temperatures.