x^2-(-5x^2-14x+2) is not equal to x^2+5x^2+14x-2 up to "commutativity and associativity" because you are distributing -1 over addition! I agree that the test you ask for is very useful (and something you'd want to test for). But, I have not written a function to distribute "-" over a sum and "sort out any resulting --".
Unary minus has been the the most difficult thing for me to deal with in STACK.
I'm sure it would be possible to do so. For code which does similar things you might like to look between lines 266-336
The "Sandbox" will be invaluable if you write some Maxima code.
I should also add that I made a start on this myself some time ago, and I have placed the code in GitHub, https://github.com/maths/moodle-qtype_stack/blob/master/stack/maxima/elementary.mac
There is also a file of "experimental code".
The point of this is to define "elementary rules" which will transform the expression repeatedly.
Start in the Maxima sandbox and
As an example take your expression,
Now, we can apply "rules" such as "distribute unary minus over addition", this is called "negDistAdd"
Next, we need to use associativity of addition, "assAdd"
We continue with a rule which removed "--",
Notice, this sorted out the "-(-14*x)", but not the "-(-5)*x^2", but as I said, this code is experimental and I never finished this off.....
I hope this gives you some idea of the issues involved in making this work. I'm sure it is possible to do, however.