This letter presents a topology optimization study of metal nanostructures optimized for electric-field enhancement in the infrared spectrum. Coupling of such nanostructures with suitable ions allows for an increased photon-upconversion yield, with one application being an increased solar-cell efficiency by exploiting the long-wavelength part of the solar spectrum. In this work, topology optimization is used to design a periodic array of two-dimensional gold nanostrips for electric-field enhancements in a thin film doped with upconverting erbium ions. The infrared absorption band of erbium is utilized by simultaneously optimizing for two polarizations, up to three wavelengths, and three incident angles. Geometric robustness towards manufacturing variations is implemented considering three different design realizations simultaneously in the optimization. The polarization-averaged field enhancement for each design is evaluated over an 80 nm wavelength range and a ±15-degree incident angle span. The highest polarization-averaged field enhancement is 42.2 varying by maximally 2% under ±5 nm near-uniform design perturbations at three different wavelengths (1480 nm, 1520 nm, and 1560 nm). The proposed method is generally applicable to many optical systems and is therefore not limited to enhancing photon upconversion.