I accidentally cooked a metal lid from an olive can in my spaghetti, but didn't find it until everyone had already eaten. Could my family get sick from it?
Cans are made from either steel (uncritical) or aluminum (dito), covered with a thin layer of tin (dito) or epoxy coating. These materials are explicitly choosen because they are food-safe1, even at higher temperatures than you use with home cooking: Tin cans are sterilized after filling to make the food inside shelf-stable.
So the only way where non-foodsafe components might be introduced would be any printing/laquer/paint, which is typically on the side of the can, not on the lid.
The epoxy in the cans may contain Bisphenol-A, which acts as endocrine disruptor (influences the hormone system) and is banned for baby bottles in some countries, e.g. all the EU. The FDA considers its use for food packaging safe.
Simply, anything is possible.
When you introduce a foreign object into a recipe, you don't know for sure what you are bringing into the fold. Regardless of whether these tins are made to be sterile themselves, there is no telling what was resting against the lid in question. I won't enumerate the possibilities of contagions.
To put it another way, if you drop a surgery-grade sterile scalpel into a sauce, it won't get you sick. (lacerated, maybe) But if you dip the scalpel into the gutter out in front of your house first, then drop it in your sauce, you will be cooking with new flavors.
Though the lid is harmless, what was dropped into the soup was the lid and additionally everything else on that lid. I had once briefly worked at a warehouse that handled, among other things, some food products. There I learned that the outside of the can is no less important than the inside. I have seen rat poison distributed on a pallet of canned soda, which was later distributed to stores to be put in vending machines.
If the lid was properly cleaned, then there is probably no worry. But if the lid was exposed to chemicals, poisons, or dirt then it would have to be properly cleaned to be safe. I like the "lick test": If you would comfortably lick that lid, then the food is probably safe. If you wouldn't lick the lid, then don't serve the food.
Modern "tin cans" are made from rolled steel covered with epoxy plastic
Epoxy plastic may release potential carcinogens when heated somewhat above 100°C, and it is not recommended by their manufactures to do so for food purposes
In this case it will be fine assuming a water (tomatoes?) based liquid sauce