This paper presents a framework for optimizing lithium-ion battery charging, subject to side reaction constraints. Such health-conscious control can improve battery performance significantly, while avoiding damage phenomena, such as lithium plating. Battery trajectory optimization problems are computationally challenging because the problems are often nonlinear, nonconvex, and high-order. We address this challenge by exploiting: (i) time-scale separation, (ii) orthogonal projection-based model reformulation, (iii) the differential flatness of solid-phase diffusion dynamics, and (iv) pseudospectral trajectory optimization. The above tools exist individually in the literature. For example, the literature examines battery model reformulation and the pseudospectral optimization of battery charging. However, this paper is the first to combine these four tools into a unified framework for battery management and also the first work to exploit differential flatness in battery trajectory optimization. A simulation study reveals that the proposed framework can be five times more computationally efficient than pseudospectral optimization alone.