Cell size control emerges from a regulated balance between the rates of cell growth and division. In bacteria, simple quantitative laws connect cellular growth rate to ribosome abundance. However, it remains poorly understood how translation regulates bacterial cell size and shape under growth perturbations. We developed a whole-cell model for growth dynamics of rod-shaped bacteria that links ribosomal abundance with cell geometry, division control, and the extracellular environment. Our work reveals that cell size maintenance under nutrient perturbations requires a balanced trade-off between ribosomes and division protein synthesis. Deviations from this trade-off relationship are predicted under translation inhibition, leading to distinct modes of cell morphological changes, in agreement with single-cell experimental data on Escherichia coli. Using a whole-cell model for the regulation of cell shape and growth by antibiotics, we predict shape transformations that bacteria can utilize to increase their fitness in the presence of antibiotics.