While several environmental factors contribute to the evolutionary diversification of the pathogenic bacterium Pseudomonas aeruginosa during cystic fibrosis lung infections, relatively little is known about the impact of the surrounding microbiota. By using in vitro experimental evolution, we show that virulent subpopulations of P. aeruginosa are maintained in the presence of interspecies competition by Stenotrophomonas maltophilia, Staphylococcus aureus, or them both, but lost in the absence of competition due to mutations in genes involved in Las, Rhl, and Pseudomonas Quinolone Signal quorum sensing systems. Moreover, the strength of competition is attenuated through changes in the physical environment by the addition of mucin, resulting in selection for phenotypes resembling those evolved in the absence of competition. Together, our findings show that variation in mucosal environment and interspecies interactions can determine the evolutionary trajectory of P. aeruginosa, partly explaining its diversification and pathoadaptation from acute to chronic phenotype during CF lung infections.