Worried about dangers of rotten food (including smell)
Far be it for me to give medical advice as I am NOT a doctor, but the likelihood that the mold you encountered was toxic is pretty small and I would not be worried. That said, if you were to start developing any kind of symptom, your best place to ask about it would be your doctor and not on the internet ;)

The presence of black mold doesn't guarantee that it is of the kind that everyone fears to find in their homes, and even if it was it doesn't mean that there are mycotoxins present and that you should be worried. Toxic mold can actually come in a variety of colours, and isn't limited to one genus/species.

I have also thrown out plenty of 'science experiments' from my fridge that required me opening containers to clean them out with very questionable looking growths of mold, and have experienced no actual illness, despite how my stomach might turn based on the smell.

As for bacterial concerns, unless you got some of what was in the bag into an open wound or mucous membrane, you have nothing to worry about there.

For reference, I studied microbiology in college and worked in biotech for a while before moving to 'greener' pastures. I've also done research specifically into black mold as we had a concern in my previous house.