I read this on a non-math forum where the OP says this is a question for Grade 6 elementary school students. Grade 6 elementary school level is somehow ambiguous but clearly this means no advanced math tool can be used. (Maybe some elementary modulo arithmetic is allowed?)
I tried in the most dumb way:
Since we know that $11\dots 1^2$ of $n\leq 9$ digits of $1$'s is $123\dots n \dots 321$ because $11\dots 1^2 = 11\dots 1 \times \sum^{n-1}_{m=0}10^m$ (which explains why the answer is $1$ goes to $n$ then goes back to $1$). So we can say $11\dots 11^2$ is to add up (digit number) of $1$, put it on that digit, and sum them up. Then we apply on $n>9$ and observe the process.
This seems promising or at least manageable. You count the number of $1$'s that are involved in computing number on the digit, and add carries from lower digits. For example, on the 102nd digits this will be $102+11+1=114$, so the carry is $11$, number of 102nd digit is $4$. Finally sum all digits up.
The work involved seems way too immense and is not beautiful. Anyone has some clever ideas about this question?
(The result is $17910$ and the original post is in Chinese, so I don't want to put the link here)
Sum $=9n+((n \bmod 9)-9) (n \bmod 9)$ where $n=$ number of digits.
Check: