Two-layer neural network on infinite dimensional data: global optimization guarantee in the mean-field regime