When I share a featureclass (share as a web layer) with ArcGIS Pro (2.7) to ArcGIS online, the data is not correct in ArcGIS Online. The featureclass is symbolized with the option “Unique values” and I have select two fields (Field1 and Field2). The data in Pro is ProblemPicture1 and the data ArcGIS Online is ProblemPicture2. As you see the values in Field1 are not the same as in ArcGIS Pro. Is this a bug?
Did you edit the data since you published it? If you did, then you have to republish the data to get it back in sync. Conversely, if you edited it in AGOL, then you need to pull a copy down and merge it with your existing data and/or replace your existing data for the 2 to be in sync again.
Could you restart your system > Open a new ArcGIS Pro Project > Add the required Feature Class > Check its attribute table for any anomaly> If everything looks good, Publish again (maybe a new web layer).
Does the issue still persist?
Yes, the first time when I saw the problem I though the data is not good. So I start a total new project and add a Featureclass, set the symbology and add some dummy records. Just for testing of the problem also occurs when I create a simple featureclass (see the pictures). Could you reproduce the problem in your Arcgis environment?
Could you test if the issue occur when the field names are different from FIELDn (Don't Use FIELD1, FIELD2, etc)? Create a new shapefile with field names that make more sense (e.g. AREANAME, POPULATION, GRIDCODE, etc.).