Are these verses to be taken literally or figuratively? There is no way to know. The figurative meaning is completely within the framework of the cursing and the absolute impossibility of accumulating wealth. In the day something is set down, it disappears. The image fits the situation of the slippery treasures.
If the image were literal, then Samuel is describing rampant theft. In a time of poverty, thieves would be alert for any item of value that might be traded for food or other necessities. There is no literal way for the earth to “swallow” goods overnight except possibly by earthquake or landslide, which are not part of the description.