The marginal distribution of $x_j$ is,
$$
p(x_j) = \frac{1}{B({\bf a})} \int_0^{1 - x_j} \int_0^{1 - x_j - x_1} \cdots \int_0^{1 - \sum_{k =1}^{K-2} x_k} \prod_{p=1}^{K-1} x_p^{a_p - 1} \left( 1 - \sum_{l=1}^{K-1} x_l \right)^{a_K - 1} d x_{K-1} d x_{K-2} \dots d x_1,
$$
where $\bf a$ is the vector of all $a_j$ values, $B({\bf a})$ is the multivariate Beta function, and the integration variables do not include $d x_j.$ We can marginalize out $x_{K-1}$ by doing the innermost integral,
$$
\int_0^{1 - \sum_{k =1}^{K-2} x_k} x_{K-1}^{a_{K-1} -1} \left( 1 - \sum_{l=1}^{K-1} x_l \right)^{a_K - 1} d x_{K-1}.
$$
Let $z (1 - \sum_{k=1}^{K-2} x_k) = x_{K-1}.$ Then the above integral becomes,
$$
\begin{split}
& \left( 1 - \sum_{k=1}^{K-2} x_k \right)^{a_{K-1}-1} \int_0^1 z^{a_{K-1}-1} \left( [1 - z] \left[1 - \sum_{k=1}^{K-2} x_k \right] \right)^{a_K -1} \left( 1 - \sum_{k=1}^{K-2} x_k \right) dz \\
= & \left( 1 - \sum_{k=1}^{K-2} x_k \right)^{a_K + a_{K-1} -1} \int_0^1 z^{a_{K-1} -1} (1-z)^{a_K -1} dz \\
= & \left( 1 - \sum_{k=1}^{K-2} x_k \right)^{a_K + a_{K-1} -1} B(a_{K-1}, a_K).
\end{split}
$$
Plugging this into $p(x_j)$ we have,
$$
p(x_j) = \frac{B(a_{K-1}, a_K)}{B({\bf a})} \int_0^{1 - x_j} \int_0^{1 - x_j - x_1} \cdots \int_0^{1 - \sum_{k =1}^{K-3} x_k} \prod_{p=1}^{K-2} x_p^{a_p - 1} \left( 1 - \sum_{k=1}^{K-2} x_k \right)^{a_K + a_{K-1} -1} d x_{K-2} d x_{K-3} \dots d x_1.
$$
Compare this to the original expression. This is very similar, except that the "determined" value $x_K$ has its role replaced by $x_K + x_{K-1}.$ We can now marginalize out $x_{K-2}$ purely by analogy to how we marginalized $x_{K-1}$ (i.e. replacing $a_K$ with $a_K + a_{K-1},$ etc.):
$$
p(x_j) = \frac{B(a_{K-1}, a_K) B(a_{K-2}, a_{K-1} + a_K)}{B({\bf a})} \int_0^{1 - x_j} \int_0^{1 - x_j - x_1} \cdots \int_0^{1 - \sum_{k =1}^{K-4} x_k} \prod_{p=1}^{K-3} x_p^{a_p - 1} \left( 1 - \sum_{k=1}^{K-3} x_k \right)^{a_K + a_{K-1} + a_{K-2} -1} d x_{K-3} d x_{K-3} \dots d x_1.
$$
Note, however, that $B(a_{K-1},a_{K}) B(a_{K-2}, a_{K-1} + a_K) = B(a_{K-2}, a_{K-1}, a_K).$
As we can see, each iteration of this procedure involves taking out the last factor from the product in the integral, the last term from the sum in the integral, adding the last $a$ coefficient to the exponent on the sum, and adding the same coefficient to the list of variables in the multivariate Beta coefficient outside the integral. We need only apply this pattern to all variables in the integral, from the inside out. We get,
$$
p(x_j) = \frac{B({\bf a}_{-j})}{B({\bf a})} x_j^{a_j -1} (1 - x_j)^{\sum_{i \ne j} a_i -1},
$$
where ${\bf a}_{-j}$ is all values of $a_k$ for $k \ne j.$ Note that $\frac{B({\bf a}_{-j})}{B({\bf a})}$ is just $\frac{1}{B(a_j, \sum_{i \ne j} a_i)}.$ Therefore,
$$
p(x_j) = \text{Beta}(x_j; a_j, \sum_{i \ne j} a_i).
$$
This was just a general version of the link provided by @marmle. (I even stole the idea of the integration substitution from it.)
EDIT: It's not clear from the notation, but in all of the integrals above, the integration variables do not include $x_j.$
Best Answer
You seem to be a little confused about the likelihood function of the $U[0,\theta]$ model.
Let $f(x\mid\theta)=1/\theta$, for $0\leq x\leq\theta$, and $f(x\mid\theta)=0$, otherwise, for $\theta>0$.
For some fixed $x$, what is the graph of $f(x\mid\theta)$ as a function of $\theta$?
To draw the graph, notice -- and this is the key point -- that $x\in[0,\theta]$ if and only if $\theta\in[x,\infty)$.
So, using indicator functions, we have $$f(x\mid\theta)=\frac{1}{\theta}I_{[0,\theta]}(x)=\frac{1}{\theta}I_{[x,\infty)}(\theta)\, .$$
After you understand this, just do the integration: $$f(x)=\int_0^\infty f(x\mid\theta)\pi(\theta)\,d\theta = \int_x^\infty \frac{1}{\theta}\pi(\theta)\,d\theta\, .$$