There isn't a way to defeat it but you just need to go through the waves and then when there done, you are free to go to the next level.
If you want to get a Moltres, train 6 Fire types to level 100, and beat the level. After beating it, you will find a baby Moltres, You can get it once in regular, shiny or shadow form. Regular allows infinite amounts, but shiny/shadow form is limited.
You can get a Regular Moltres by using 6 level 100 fire type Pokemon with at least one of them being Regular the rest could be Shiny, Shadow or just all of them Regular.
To get a Shadow Moltres you need to get 6 level 100 Shadow Fire type Pokemon unlike getting the Regular moltress you need to have 6 Level 100 Shadow Fire type Pokemon and no Shiny or Regular.
To get a Shiny Moltres you need to get 6 level 100 Shadow Fire type Pokemon much like getting the Shadow Moltress you need 6 Shiny level 100 Pokemon and no Shadow or Regular.