Yes, spray foam is safe. Some people can be sensitive to the fumes that come from the installation process. we recommend that occupants vacate the home once the spraying has begun and for a period of 12-24 hours after it ends. This will allow for the foam to fully off-gas, and afterward, the home will be completely safe to live in.
In a conventional attic, it needs to have ventilation to exhaust the heat and moisture, but since spray foam prevents heat from seeping in and causing condensation, ventilation is not needed.
If undisturbed and shielded from direct sunlight, spray foam should last the lifetime of the structure. It does not break down, so it lasts indefinitely.
Yes, it can. In crawlspaces, unfinished basements, and attics.