Why do I feel the negative effects of a bad meal still days later?

Takes 4 days. You can expect about a 4 day interval to return to your usual self after a "bad meal.". Food components: proteins, sugars, vitamins etc. Usually take about that long to clear through your body. That is also why people can have so much difficulty figuring out food allergies. There's a lot of overlap in potential causes of symptoma unless they're on a true elimination diet.
Takes time to heal. We an feel the effects of a "bad" food within hours to up to 7 days. The food has to be processed and if you are intolerant or allergic you may feel the effects for a week.