Tight bound on the number of divisors of n
Assume your input is $n$. I also assume that you know that we measure the time complexity of an algorithm as a function of input length to this algorithm which is $\log_2{n}$ in this case. Then even the following simple loop would take exponential time (as a function of input size)

for i=1 to n:
   print "hi"
end


since it loops $n$ times, where $n = 2^{\log_2{n}} = 2^{\text{input size}}$.

More precisely, its running time (as Yuval Filmus commented) is roughly $O(nn^{1/{\log{\log{n}}}})$ which is still exponential. But since your algorithm is $O(n^2)$ it is pseudo polynomial (polynomial in the numeric value of the input, not input size).