What does 他得经历九九八十一难 refer to?
It is from 'Multiplier table'


Normally, saying 81 days is enough, saying 九九八十一  emphasize nine circles of nine days periods
The most commonly quoted Multiplier table phrase is 七七四十九日 (7x7=49). emphasize seven circles of seven days periods. Because  traditionally Chinese believe after a person died, his soul would go through a procedure every seventh day, until the seventh seventh day. After that, the fate of his soul is determined and the mourning period is over
As for the nine days cycles, Nine is a significant number for Chinese, it represent 'infinity' among other things

为了成佛，他得经历(九九)八十一难
In order to become a Buddha, he had to go through (nine sets of nine) eighty one catastrophes/ challenges

I presume each set of nine is harder than the previous set of nine
Another commonly quoted one is .三七二十一 (3x7=21) As in &quot;不管三七二十一&quot; (meaning 'no matter what')
Also there is a saying :三三不盡六六無窮 (3x3 and 6x6 represent 'endless, infinite')