I actually read about hay storage when I was looking for a similar solution, and while I do know that hay can get mouldy (presumably from exposure to moisture), I think it is better to keep it in a dry place.
I once kept my hay in a canvas and metal laundry basket with wheels, because it’s best to have it aerated underneath, and the hay is supposed to be able to breathe in a cool, dry and dark environment. You could always put the hay on a pallet, and maybe protect it with tarp, but I would be worried that the rain, humidity (if you live somewhere humid) or rodents would ruin the hay. I once found a flattened vole in my box of hay, so I know they get into it in the fields.
I now keep my hay in the box it came, and I buy smaller quantities so it doesn’t go bad, and because I don’t have the space or strength to move a larger amount of hay, but that is just my preference. Hay properly stored can keep for many months, but I can’t remember exactly how long – maybe 6 months??