If I publish a layer that has field names that are all upper case from our sde geodatabase as a map and feature service, the field names in both are all lower case. If I publish just as a map service, then the field names in the published map service are all upper case. I have publishing rights to our portal, and my machine is running 10.5.1.
If our administrator, who is also running 10.5.1, publishes from the same .mxd that I use, the feature service and map service both retain upper case field names. We use the same parameters for creating the services.
I have also tried excluding the kml option, but this has no effect.