As reported on this thread, the objects rendered with custom passes don't work well with SSGI (they render black as if there were no diffuse lighting).
This can probably be fixed by binding the diffuse lighting buffer when rendering objects in the custom pass, it would require adding a new function to access this buffer.
https://discussions.unity.com/t/hdrp-custom-pass-screen-space-effects/1546509/4