Suppose I know that I'm going to eventually end up grating all of my cheese. Is there a reason to not just toss it all into a blender and store it for later? To be more concrete, I'm particularly interested in the answer as it pertains to Parmigiano-Reggiano and Pecorino Romano, both the bonafide sorts and any variations that can be sold under the same name in the United States.
You should only grate cheese as needed, particularly the cheeses you mention. When you grate cheese you create more surface area. That is more surface exposed to air and oxidation, which will degrade the flavor and aroma of the cheese. It is also more prone to drying out further degrading the quality. The cheeses you mention are best when grated for immediate use, but stored in chunks, wrapped and refrigerated.
While you don't want to grate the cheese and store it in the fridge, as moscafj's answer says, there is a way you can grate all the parmesan, store it, and use it as needed - just keep it in the freezer.
You can add it directly to whatever you're cooking, no need to defrost, although I don't know how well it would work scattered on top of a finished dish. Make sure to store it in an airtight container (a resealable freezer bag works well).
There's some discussion of this on canyoufreeze.com, including an explanation for why freezing works so well with parmesan:
Parmesan cheese has a low moisture content, making it ideal for freezing. It doesn’t have a tendency to clump together, and is not very susceptible to freezer burn. Grated Parmesan cheese should stay soft even while frozen. It can be used directly out of the freezer, without any need to thaw ahead of time. It’s the ideal cheese for freezing!
Short answer: Grated cheese goes moldy quickly.
Long answer: We regularly grate cheese and pack them in vacuum bags in larger quantities. They usually go moldy within a week or two, even in the fridge. Frozen storage should be possible for months, if not years. (I kept grated cheese in the freezer for up to five years.)
From a more general point of view, cheese is already "milk made storable". The rind is a very sophisticated protection against decay. In most cases, it is best to keep the rind as long as possible.
(I am a cheesemaker.)