The former! Say you have space asteroid productivity 10 (100%), and go through the wormhole.
When you eventually get to Gleba and can unlock Asteroid Productivity 1, the bonus goes from 100% to 110% :)
There are some technologies that don't give infinite bonuses: these seem to reset back to zero when you go through, like belt stack size and robot carrying capacity: those reset to +0, but infinite techs behave like I said.
The thing I've not tested is whether you can increase recycling productivity recipes above 300% this way: if it is possible I'll need to bug fix it