Increased temperatures associated with urbanization (the "urban heat island" effect) have been shown to impact a wide range of traits across diverse taxa. At the same time, climatic conditions vary at fine spatial scales within habitats due to factors including shade from shrubs, trees, and built structures. Patches of shade may function as microclimate refugia that allow species to occur in habitats where high temperatures and/or exposure to ultraviolet radiation would otherwise be prohibitive. However, the importance of shaded microhabitats for interactions between species across urbanized landscapes remains poorly understood. Weedy plants and their foliar pathogens are a tractable system for studying how multiple scales of climatic variation influence infection prevalence. Powdery mildew pathogens are particularly well suited to this work, as these fungi can be visibly diagnosed on leaf surfaces. We studied the effects of shaded microclimates on rates of powdery mildew infection on Plantago host species in (1) "pandemic pivot" surveys in which undergraduate students recorded shade and infection status of thousands of plants along road verges in urban and suburban residential neighborhoods, (2) monthly surveys of plant populations in 22 parks along an urbanization gradient, and (3) a manipulative field experiment directly testing the effects of shade on the growth and transmission of powdery mildew. Together, our field survey results show strong positive effects of shade on mildew infection in wild Plantago populations across urban, suburban, and rural habitats. Our experiment suggests that this relationship is causal, where microclimate conditions associated with shade promote pathogen growth. Overall, infection prevalence increased with urbanization despite a negative association between urbanization and tree cover at the landscape scale. These findings highlight the importance of taking microclimate heterogeneity into account when establishing links between macroclimate or land use context and prevalence of disease.