$xx^T$ is a tricky one since we don't want to confuse it with $x^Tx$
Generally a good idea is to write matrices with capital letters and vectors with lowercase.
Another idea I'm being taught that is especially useful when writing on paper or when using scalars, vectors and matrices together is to underline vectors once and matrices twice.
So like $\underline{\underline{A}} \in \mathbb{R}^{nxn}$ and $\underline x \in \mathbb{R}^n$.
Back to your original question.
If you have $x \in \mathbb{R}^n$ and $A \in \mathbb{R}^{nxn}$ you might want to define the following notation:
1.) $x^2:=x^Tx$ since this is a scalar now.
2.) $X:=xx^T$ since this is a matrix now.
3.) $x^A:=x^TAx$ this can't be confused easily since vector to the power of matrix doesn't make sense normally.
And for your last one $X^TAX$ I'd recommend to follow #3 and to define $X^A:=X^TAX$ here we need to care about number #2. But we want to avoid to use x and X at the same time if they have nothing in common. On the other hand if you want to write $(xx^T)^TAxx^T = xx^TAxx^T =: X^A$ this notation would be useful.