Competition through cross-reacting host immune responses, a form of apparent competition, is a major driver of pathogen evolution and diversity. Most models of pathogens have focused on intraspecific interactions to explain observed patterns. Two recent experiments suggested that Haemophilus influenzae, a common nasopharyngeal colonizer of humans, might alter the immune environment in a way that favors otherwise less fit serotypes of another common pathogen, pneumococcus. Using a computational model, we demonstrate that H. influenzae, if it consistently raises the fitness of the less fit serotypes, can strongly promote pneumococcal diversity. However, the effects of H. influenzae are so sensitive to the prevalence of H. influenzae that this species is unlikely to be the main driver of serotype coexistence. Interactions that significantly affect diversity could furthermore be extremely difficult to detect through co-occurrence analysis alone. These results suggest that small differences in strains’ adaptations to different immunological regimes, which are shaped by coinfections with other pathogens, can have dramatic effects on strain dynamics and patterns of phenotypic variation. Studies of microbial communities might therefore benefit from the use of varied approaches to infer the presence of indirect interactions.