I have run into a very similar problem a few times while working in Google Earth Engine and never found a good solution.
I am working with raster data (continuous values) and a feature collection of ecosystems, and my goal is to summarize the raster values over a column within the feature collection. The ecosystems shapefile has a column that assigns each ecosystem to a biome (so there are 827 ecosystems and 14 biomes). I want to calculate the mean raster value over these biomes.
In ArcMap I would use zonal statistics as table and specify that I want to calculate the statistics over the biome column, but I have not found a good way to accomplish this in GEE. So far I have been using the reduceRegions function and specifying my feature collection as the collection, but this only lets me summarize the raster values over the 827 ecosystems.
Is there a function that would allow me to do this in GEE? Or would it be easier to just make the changes to the shapefile in Arc and then re-import it?