you could beat this a number of ways. I've dealt with this very strategy before, and I find the first two solutions to work the best.
-You could use Mist to prevent the stat changes, or Haze to reset them.
-Put the "red card" on your pokemon, so if they do end up attack, they'll switch and ruin their whole strategy.
-While not the best solution, you could use infinite accuracy moves like Aura Sphere, Aerial Ace, or Faint attack.
-The ability No guard could break through it with ease. Though this one is pretty situational.
-You could use Psych up or Ditto to fight fire with fire, though it doesn't solve your problem, it at least gives you plenty of accuracy.
-You could predict when they start to set up and use Taunt/Encore.
-I tried this once, and it's unexpected and gets the job done. Toxic spikes is good for poisoning them, so after setting up long enough, they are forced to either die or switch, thus ruining them. Obviously Steel, poison, and flying types present a problem, but it still works for a number of other pokemon.