Genetic diversity is heterogeneously distributed among populations of the same species, due to the joint effects of multiple demographic processes, including range contractions and expansions, and mating systems shifts. Here, we ask how both processes shape genomic diversity in space and time in the classical Primula vulgaris model. This perennial herb originated in the Caucasus region and was hypothesized to have expanded westward following glacial retreat in the Quaternary. Moreover, this species is a long-standing model for mating system transitions, exemplified by shifts from heterostyly to homostyly. Leveraging a high-quality reference genome of the closely related Primula veris and whole-genome resequencing data from both heterostylous and homostylous individuals from populations encompassing a wide distribution of P. vulgaris, we reconstructed the demographic history of P. vulgaris. Results are compatible with the previously proposed hypothesis of range expansion from the Caucasus region approximately 79,000 years ago and suggest later shifts to homostyly following rather than preceding postglacial colonization of England. Furthermore, in accordance with population genetic theoretical predictions, both processes are associated with reduced genetic diversity, increased linkage disequilibrium, and reduced efficacy of purifying selection. A novel result concerns the contrasting effects of range expansion versus shift to homostyly on transposable elements, for the former, process is associated with changes in transposable element genomic content, while the latter is not. Jointly, our results elucidate how the interactions among range expansion, transitions to selfing, and Quaternary climatic oscillations shape plant evolution.