For glancing-incidence optical systems, such as short-wavelength optics used for nano-focusing, incorporating physical factors in the calculations used for shape optimization can improve performance. Wavefront metrology, including the measurement of a mirror's shape or slope, is routinely used as input for mirror figure optimization on mirrors that can be bent, actuated, positioned or aligned. Modeling shows that when the incident power distribution, distance from focus, angle of incidence, and the spatially-varying reflectivity are included in the optimization, higher Strehl ratios can be achieved.Following the works of Maréchal and Mahajan, optimization of the Strehl ratio (for peak intensity with a coherently illuminated system) occurs when the expectation value of the phase error's variance is minimized. We describe an optimization procedure based on regression analysis that incorporates these physical parameters. This approach is suitable for coherently-illuminated systems of nearly diffraction-limited quality. Mathematically, this work is an enhancement of the methods commonly-applied for ex-situ alignment, based on uniform weighting of all points on the surface (or a sub-region of the surface). It follows a similar approach to the optimization of apodized and non-uniformly illuminated optical systems.Significantly, it reaches a different conclusion than a more recent approach based on minimization of focal plane ray errors.