Yes, soil can shrink. It depends on the character of the soil (is it clayey, sandy or silty?) Clayey soils are more susceptible to moisture changes and can shrink or expand depending on moisture content. These actions can be so significant as to cause entire structures to move either up or down, depending on the moisture content. When the moisture content is high, clayey soils will tend to expand. When the moisture content is low, clayey soils tend to shrink. The extent of this expansion/shrinkage depends on the character of the clay minerals. Some clayey soils are highly expansive while others exhibit little or no moisture expansion.
Silts can exhibit similar properties though usually not as forceful. Sands do not typically expand or shrink with moisture.