Streptococcus pneumoniae (Sp) is a commensal bacterium that normally resides on the upper airway epithelium without causing infection. However, factors such as co-infection with influenza virus can impair the complex Sp-host interactions and the subsequent development of many life-threatening infectious and inflammatory diseases, including pneumonia, meningitis or even sepsis. With the increased threat of Sp infection due to the emergence of new antibiotic resistant Sp strains, there is an urgent need for better treatment strategies that effectively prevent progression of disease triggered by Sp infection, minimizing the use of antibiotics. The complexity of the host-pathogen interactions has left the full understanding of underlying mechanisms of Sp-triggered pathogenesis as a challenge, despite its critical importance in the identification of effective treatments. To achieve a systems-level and quantitative understanding of the complex and dynamically-changing host-Sp interactions, here we developed a mechanistic mathematical model describing dynamic interplays between Sp, immune cells, and epithelial tissues, where the host-pathogen interactions initiate. The model serves as a mathematical framework that coherently explains various in vitro and in vitro studies, to which the model parameters were fitted. Our model simulations reproduced the robust homeostatic Sp-host interaction, as well as three qualitatively different pathogenic behaviors: immunological scarring, invasive infection and their combination. Parameter sensitivity and bifurcation analyses of the model identified the processes that are responsible for qualitative transitions from healthy to such pathological behaviors. Our model also predicted that the onset of invasive infection occurs within less than 2 days from transient Sp challenges. This prediction provides arguments in favor of the use of vaccinations, since adaptive immune responses cannot be developed de novo in such a short time. We further designed optimal treatment strategies, with minimal strengths and minimal durations of antibiotics, for each of the three pathogenic behaviors distinguished by our model. The proposed mathematical framework will help to design better disease management strategies and new diagnostic markers that can be used to inform the most appropriate patient-specific treatment options.