I think the best way to remove all ambiguity is to write
[tex]\bigg(\ln(x)\bigg)^2[/tex]
[tex]\ln^2(x)[/tex] is often used to mean the same thing, but in some contexts it is used to mean the composition of logarithms, [tex]\ln^2(x) := \ln(\ln(x))[/tex].
[tex]\ln x^2[/tex] and [tex]\ln(x^2)[/tex] and [tex]\ln(x)^2[/tex] could all mean the same thing - the logarithm of the quantity [tex]x^2[/tex]. For real, non-zero [tex]x[/tex], this is equivalent to [tex]\ln(x^2) = 2\ln|x|[/tex], but this is not true for either of the squared- or compound-logarithm interpretations.
[tex]\bigg(\ln(x)\bigg)^2[/tex] very clearly shows what's being squared