Polynomial Approximations for Infinite-Dimensional Optimization Problems