We can use a contour integral in the complex plane, as I showed here for the case $n=3$. Now, however, we use
$$\oint_C dz \frac{\log^2{z}}{z^n-1}$$
where $C$ is the modified keyhole contour about the positive real axis of outer radius $R$ and inner radius $\epsilon$.
Let's evaluate this integral over the contours. As before, there are $8$ pieces to evaluate, as follows:
$$\int_{\epsilon}^{1-\epsilon} dx \frac{\log^2{x}}{x^n-1} + i \epsilon \int_{\pi}^0 d\phi \, e^{i \phi} \frac{\log^2{\left (1+\epsilon e^{i \phi}\right )}}{(1+\epsilon e^{i \phi})^n-1} \\ + \int_{1+\epsilon}^R dx \frac{\log^2{x}}{x^n-1} + i R \int_0^{2 \pi} d\theta \, e^{i \theta} \frac{\log^2{\left (R e^{i \theta}\right )}}{R^n e^{i n \theta}-1} \\ + \int_R^{1+\epsilon} dx \frac{(\log{x}+i 2 \pi)^2}{x^n-1} + i \epsilon \int_{2 \pi}^{\pi} d\phi \, e^{i \phi} \frac{(\log{\left (1+\epsilon e^{i \phi}\right )}+i 2 \pi)^2}{(1+\epsilon e^{i \phi})^n-1} \\ + \int_{1-\epsilon}^{\epsilon} dx \frac{(\log{x}+i 2 \pi)^2}{x^n-1} + i \epsilon \int_{2 \pi}^0 d\phi \, e^{i \phi} \frac{\log^2{\left (\epsilon e^{i \phi}\right )}}{\epsilon^n e^{i n \phi}-1} $$
As $R \to \infty$, the fourth integral vanishes as $\log^2{R}/R^{n-1}$. As $\epsilon \to 0$, the second integral vanishes as it is $O(\epsilon^n)$, while the eighth integral vanishes as $\epsilon \log^2{\epsilon}$. This leaves the first, third, fifth, sixth and seventh integrals, which in the above limits, become
$$PV \int_0^{\infty} dx \frac{\log^2{x} - (\log{x}+i 2 \pi)^2}{x^n-1} + i \frac{4 \pi^3}{n}$$
The residue computation is a little more involved, because we now have $n-1$ poles at which we need to evaluate residues. The contour integral is thus
$$i 2 \pi \sum_{k=1}^{n-1} \frac{-4 \pi^2 k^2/n^2}{n e^{i 2 (n-1) \pi k/n}} = -i \frac{8 \pi^3}{n^3} \sum_{k=1}^{n-1} k^2 \, e^{-i 2 (n-1) \pi k/n} $$
The sum is doable, but the algebra is a bit hideous. The result is
$$\sum_{k=1}^{n-1} k^2 \, e^{-i 2 (n-1) \pi k/n} = \frac12 \left ( \frac{n}{\sin^2{\frac{\pi}{n}}} - n^2\right ) - i \frac12 n^2 \cot{\frac{\pi}{n}} $$
Equating real and imaginary parts of both equations for the contour integral yields
$$\int_0^{\infty} dx \frac{\log{x}}{x^n-1} = \frac{\pi^2}{n^2 \sin^2{\frac{\pi}{n}}} $$
$$PV \int_0^{\infty} dx \frac{1}{x^n-1} = -\frac{\pi}{n} \cot{\frac{\pi}{n}} $$