Yeah, sure. I don't really understand why you would want to switch them, but I am sure your idea is great.

I can tell you how to do it, though
First you make a skill, the skill that you just described, and you make that skill trigger a common event.
We come back at the common event in a minute, but first lets talk about the skill formula.
To make this skill, we need to use 1 variable in the formula. For this formula I will use variable 1. If you use another variable, simply change the 1 to the id of the variable you use. The formula should be like this:
v[1] = a.atk - a.mat ; 0
This makes that variable 1 is not the difference between ATK and MAT of the spell caster. It is important that you make the skill target anything (friend or foe) and that the type is set to damage. (If you set it to heal, the formula would not set Var 1 if the target is at full health.)
Best to target the caster if the skill does nothing else. But you can also have the skill target an enemy, do damage and then AFTER the damage is done, it will trigger the common event. (In this case replace the 0 in my formula with the actual battle formula)
Now, for the common event. You just need 2 little commands:
Change ATK of actor: - variable 1
Change MAT of actor: + variable 1
View attachment 209156
That is all you need to do. The same skill will switch the values back if triggered again.