Host immunity is a major driver of pathogen evolution and thus a major determinant of pathogen diversity. Explanations for pathogen diversity traditionally assume simple interactions between pathogens and the immune system, a view encapsulated by the susceptible-infected-recovered (SIR) model. However, there is growing evidence that the complexity of many host-pathogen interactions is dynamically important. This revised perspective requires broadening the definition of a pathogen's immunological phenotype, or what can be thought of as its immunological niche. After reviewing evidence that interactions between pathogens and host immunity drive much of pathogen evolution, I introduce the concept of a pathogen's immunological phenotype. Models that depart from the SIR paradigm demonstrate the utility of this perspective and show that it is particularly useful in understanding vaccine-induced evolution. This paper highlights questions in immunology, evolution, and ecology that must be answered to advance theories of pathogen diversity.