Statistical learning for constrained functional parameters in infinite-dimensional models with applications in fair machine learning