I have never known or seen this way in the people around me. This is quite old fashioned in this day and age, and I think very few people keep money or gold underground. My question is, is the money taken from the ground still in its original condition? Because as far as I know, even if it is covered with plastic, the chances of it being damaged are very high, it could be eaten by insects or hit by rainwater that is absorbed into the ground.
Even if you want to keep it at home because if you keep it at a bank or something like that there will be additional costs, why not keep it in a safe-deposit box? In my opinion, it is safe to store money and gold in there.
I haven't tried it with money but other papers and cards wherein they were completely eaten off by the bacteria or insects so it would be the dumbest idea to keep the valuables under ground in this era, I think there would have been good preservence techniques which were used during olden days and most importantly the money back then were not paper money they were coins hence the would have survived.