The interplay between metal contamination and climate change may exacerbate the negative impact on the soil microbiome and, consequently, on soil health and ecosystem services. We assessed the response of the microbial community of a heavy metal-contaminated soil when exposed to short-term (48 h) variations in air temperature, soil humidity or ultraviolet (UV) radiation in the absence and presence of Enchytraeus crypticus (soil invertebrate). Each of the climate scenarios simulated significantly altered at least one of the microbial parameters measured. Irrespective of the presence or absence of invertebrates, the effects were particularly marked upon exposure to increased air temperature and alterations in soil moisture levels (drought and flood scenarios). The observed effects can be partly explained by significant alterations in soil properties such as pH, dissolved organic carbon, and water-extractable heavy metals, which were observed for all scenarios in comparison to standard conditions. The occurrence of invertebrates mitigated some of the impacts observed on the soil microbial community, particularly in bacterial abundance, richness, diversity, and metabolic activity. Our findings emphasize the importance of considering the interplay between climate change, anthropogenic pressures, and soil biotic components to assess the impact of climate change on terrestrial ecosystems and to develop and implement effective management strategies.