Both landscape grass and painted foliage use exactly the same code to render (HierarchicalInstancedStaticMeshComponent). The only difference is that the landscape grass components only exist around the camera and the instances get placed at runtime (in a background thread).
The more grass layers you use, the more memory you will use to store the layer weight maps which are used for runtime placement. For each landscape component it will store 1 byte per vertex for the weight info for each layer used on that component. It also uses 2 bytes per vertex on components with any grass at all, for height placement info. This data is much smaller than the data needed to store info about a foliage instance (around 80 bytes per instance).
The 10 grass layer limit at editor generation time is completely arbitrary and will have a very minor effect on editor performance when it’s actually building grassmaps, ie when you see the notification “Building Grass Maps…” in the bottom right corner of the screen.