We study quadratic optimization over orthogonality or symplectic constraints, a problem arising in eigenvalue computation, subspace analysis, and reduced-order modeling. Ill-conditioned problems have a wide positive Hessian spectrum at a minimizer, which slows first-order Riemannian methods. Existing preconditioned-metric approaches choose a Riemannian metric, which determines the resulting Hessian spectrum. We instead redesign the problem itself to find the narrowest possible spectrum. We reshape the constraints into equivalent formulations that preserve the optimal value and the solution set, giving a family of preconditioned problems parametrized by positive constraint weights. We derive a closed form for the positive Hessian spectrum in terms of these weights. Minimizing the condition number then reduces to a linear program (LP) in the logarithms of the weights. The LP attains a globally optimal design within the paired equal-block family, and its strong duality gives matching lower bounds on the condition number. On tested instances, the optimized formulation substantially reduces the local condition number, with returned spectra matching predictions on both orthogonal and symplectic instances. We also benchmark the design against Lagrangian and left-right preconditioned metrics. The method thus provides an exact, optimization-based alternative to heuristic preconditioned metrics.