It's generally recommended to follow the storage and expiration guidelines provided by the manufacturer for food safety reasons. Consuming food that has exceeded its shelf life can increase the risk of foodborne illnesses.
In the case of the pumpkin pie you described, it was kept at room temperature for five days past its shelf life. While there may not be any visible signs of spoilage, it's difficult to determine the safety of the pie without conducting a proper inspection. Bacterial growth and other pathogens may not always be detectable by sight or smell.
Additionally, freezing the pie after it has been kept at room temperature for an extended period may not necessarily eliminate any potential risks associated with its prolonged storage.
To prioritize food safety, it's generally recommended to adhere to the manufacturer's guidelines and dispose of food items that have exceeded their shelf life. If you have concerns about the safety of consuming the pumpkin pie, it would be best to err on the side of caution and avoid eating it.