No! For mold to grow, two things are needed: moisture and a food source.  Spray foam does not retain water, prevents condensation in the building envelope and is inert; thus it does not allow things like mold or bacteria to grow.