Continuing from your conclusion, we can show that all of these are valid answers for $n$. This is a recipe for specifying $x_j$s for any such valid $n$. Let us define two parameters. Suppose $p=\frac{24}{n-1}$. By OP's proof this is a valid natural number. Now let $\beta$ be the maximum integer for which $p\geq1+n+n^2+...+n^{\beta}$
As examples,
- for $n=2$, we have $p=\frac{24}{1} = 24$ and $\beta=3$ since $24\geq2^0 + 2^1 + 2^2 + 2^3$ (cannot add $2^4$)
- for $n=7$, we have $p=\frac{24}{6} = 4$ and $\beta=0$ since $4\geq7^0$ (cannot add $7^1$)
We propose that the following choice of $x_j$'s suffices:
$x_{26} = \beta+3$ and for other $x_j$'s
$x_j = 1 \qquad \text{if} \qquad j\leq n \cdot \big(p-\sum_{j=0}^{\beta} n^j\big) \qquad (\text{see additional proof at end})$
$x_j = 2 \qquad $otherwise
The proof is simple. The summation becomes:
$\sum_{k=1}^{25}n^{x_k} = n \cdot \big(p-\sum_{j=0}^{\beta} n^j\big) \times n^1 + \bigg(25 - n\cdot \big(p-\sum_{j=0}^{\beta} n^j\big) \bigg)\times n^2$
$ \qquad \qquad = n^2\bigg(25-(n-1)\cdot\big(p-\sum_{j=0}^{\beta} n^j\big)\bigg)$
$\qquad \qquad = n^2\bigg(25 - (n-1)p \quad + \quad (n-1)\cdot\big(\sum_{j=0}^{\beta} n^j\big)\bigg)$
Using the well known formula for the sum of GP and the definition of $p$, we get:
$\qquad \qquad = n^2\bigg(25 - 24 \quad + \quad n^{\beta+1}-1\bigg)=n^{\beta+3} = n^{x_{26}}$
Of course in either case for a given $n$, we can increase all $x_j$'s by the same amount and still get valid solutions, so for each of these $n$ values, we have infinite set of $x_j$ solutions
Additional Proof
We also show that the number of terms set equal to $1$ are necessarily less than $25$ so that this is a valid prescription. Note that by definition of $\beta$, we have:
$\qquad \quad p<n^{\beta+1} + \sum_{j=0}^{\beta} n^j$
$\iff 25 + \big(p - \sum_{j=0}^{\beta} n^j\big) - n^{\beta+1} < 25$
$\iff 24+p+1 - \sum_{j=0}^{\beta} n^j - n^{\beta+1} < 25$
$\iff (n-1)p + p - \sum_{j=1}^{\beta+1} n^j < 25$
$\iff np - n\cdot \sum_{j=0}^{\beta} n^j < 25$
$\iff n \cdot \big(p-\sum_{j=0}^{\beta} n^j\big) < 25$
$$\tag*{$\blacksquare$}$$