Do you make home-made ham?
While home-curing of meat isn't rocket-science, it isn't trivial either. If someone got botulism from home-made ham then quite likely either it wasn't ham at all, because it hadn't actually cured the pork correctly, or it was too long in a wet-cure fluid that even though that fluid is pretty much designed to kill bacteria like clostridium botulinum (the cause of botulism), it was no longer doing so.
Now, not to put people off home-curing; it's mostly safe and is a rewarding craft to practice, but it does have a different set of risks and concerns when it comes to bacteria than cooking from store-bought ingredients, home-grown fruit and vegetables or even home-hung meat. If you're home-curing then you are the person in charge of making sure that it actually is cured meat, and there's a reason why there's a lot more precision in the mathematics of putting together a curing brine than there is in putting together a soup. (If you cook and bake but don't cure, then you have probably noticed that on average baking gives less leeway to imprecision and "that looks about right" in a recipe than cooking. Curing is a little bit less forgiving again than baking is).
To come to your specific questions:
Assuming I'm making a soup and I have a canned jar of tomatoes, and somehow it's infested - if I boil them for 20 minutes with other ingredients, the toxin will die, right? But what about the spores? I know they won't die because the temperature is not high enough, but does this mean they are safe to eat?
This study heat-treated fish deliberately infected with 5,000 LD50 mouse units of botox per .5ml. That is to say, they took 5,000 times more botox than you would need to have even odds of killing a mouse in every half-millileter. Hence every teaspoon full had 50,000 times as much. That is probably way more botox than the bad ham that killed your compatriot had.
And the results were that normal cooking is more than adequate to denature the botox.
It won't kill the spores, but the conditions in your gut are not conducive to their growth, so this will likely not be a problem (you've almost certainly eaten botulism spores if you've eaten honey, but not the poisonous botox they can produce, because honey isn't conducive to it either).
Unless you have extremely poor hygiene when it comes to later going to the toilet, you will not be at risk.
And this is before we consider that the risks of botulism being present in tinned tomatoes is extremely low.
There is a folklore about tinned foods and botulism, but that arises from risks of canned meat that existed many decades ago. Tinned tomatoes were never a big risk, and even tinned meat isn't today unless the tin is visibly damaged.
Really, you can just eat those tinned tomatoes raw and you'll likely still be fine.
I'm concerned when it comes to airtight sealed food, like mozzarella, feta, cheese and ham. How safe are these?
Extremely safe if stored correctly and eaten within their stated time limits and when they have no visible signs of spoiling.
Even of the risks that do exist, botulism is pretty far down the list. The main ways you are likely to get botulism aren't food at all, but infected wounds (especially if you are using intravenous drugs without clean needles, though it can happen from other wounds), industrial accidents while working with botox, or being under about 1.5years of age and having been born with a colony or eating untreated honey.
There are other diseases to worry about more, though they would vary according to just where in the world you are and where your food is sourced from (I'd be a lot happier eating something containing raw eggs in Europe than in the US, for example). Basic food safety practices will suffice to keep you healthy.