The theorem of Pythagoras, which you will remember from school trigonometry classes, states (in the wording I was taught) that in a right-angled triangle the square on the hypotenuse is equal to the sum of the squares on the other two sides. Here, square and squares are regularly accented.
The word squared is not accented (unless of course it is contrastive). You might suppose that this is because we avoid accenting any item that is repeated or about to be repeated — a well-established principle in English accentuation.
However, this carries over, rather mysteriously, into cases where no repetition is involved.
Hence the constant in Einstein’s equation, the square of the speed of light, c2, has the spoken (recommended) default pattern ˈC squared.
So far, so good. But as soon as the item to be raised to the power of two is complex, involving more than one symbol, the word squared defaults to being accented. The expression (a + b)2 is said aloud as ˈA plus ˈB ˈsquared The expression (ax)2 is read as ˈA ˈX ˈsquared. I’m not sure why.
Hence the default interpretation of spoken ˈA ˈX squared is ax2, while the default interpretation of spoken ˈA X ˈsquared is (ax)2.
But a further way of avoiding the possible ambiguity in the latter is to say A X all squared. And in that wording you place the main accent on all — I think. Similarly, for (a + b)2 we can say ˈA plus ˈB all ˈsquared. Do you agree? It’s a long time since I did algebra.
None of this applies to cubed or higher powers. We say x3 as ˈX ˈcubed and x4 as ˈX to the ˈfourth.