It's gramatically correct, spend is a noun here (but you expected a verb).
https://en.wiktionary.org/wiki/spend#Noun