Custom node access, need to rebuild permissions for each content item created
It seems like your problem matches the following:


  This function is called when a node is saved, and can also be called by modules if something other than a node save causes node access permissions to change.


This is an excerpt from the node_access_acquire_grants documentation.
I believe a way to go about your problem would be to call this function, inside your form_submit handler (guessing you have one).

So, on a conceptual level, as soon as the anonymous user enters the code, the node access permissions for that specific page changes and you should update them (writing them to the database) through a call to node_access_acquire_grants

Good luck, let us know how this goes!