Escaping photons from a forming black hole is it possible for light to escape to infinity if it starts its journey from a region between the expanding event horizon and the schwarzschild radius of a collapsing star?
if no, how does the black hole know it will gobble up those photons in the future?
 A: The event horizon and Schwartzchild radius are exactly the same. There is no "in between."
Perhaps you are asking, "When the event horizon forms in what used to be the core of the star, what happens to any stellar material that is still on the outside of the horizon, and to the light it emits?"
The answer to that is, from an outsider's view, the excess stellar material appears to sink and redshift into invisibility at the horizon.  Just like any other material that later approaches the horizon.
As for light emitted by the glowing stellar material, in general it depends on exactly where it is emitted from (with respect to the photon sphere distance). But  if we assume it is directed radially outward, yes it will escape, albeit very redshifted.  Light emitted radially outward anywhere outside the horizon can always escape.
(Note: I've been assuming a Schwartzchild, non-rotating black hole)
Edit to address your comment:
Schwartzchild radius formula is:
$$R = \frac{2G}{c^2} M
$$
which is proportional to the mass $M$.  Actually every single object has a Schwartzchild radius, simply by plugging its mass into the formula.  Earth has one which is about 1.8 cm.  An event horizon can only form if all of that mass is compressed into a spherical region of radius $r$ where $r<R$.  So in the process of stellar collapse, we do not see a horizon start forming at microscopic size and then grow. The core material compresses until at some radius within the core, the material inside has a Schwartzchild radius greater than the radius it occupies.
A: Event horizons are defined, formally, by mathematically going to the final future of all geodesics in the spacetime, finding all of the geodesics that went into the black hole, and then taking the outer boundary of all of these geosdesics.
By this definition, any point outside the event horizon has some path to escape the black hole.  Any other detail is superflous, but it's kind of a tautology that is not interesting, too.
