An ATV that is backfiring after shutting the engine off is most commonly caused by overly rich jetting in the carburetor.
The carburetor may need to be adjusted so that the fuel and air mixture is just right as it is likely getting too much fuel into the carburetor when it's being shut off and that excess fuel causes a bigger explosion in the combustion chamber which then leads to backfiring.
I had an ATV that would backfire on shutting off and I couldn't figure the problem out and took the ATV to an ATV shop and they found the problem to be an adjustment on the carburetor.
So it was a pretty cheap and easy fix to fix the carburetor adjustment.
If you're unsure on how to adjust the carburetor I would take the ATV to a shop who knows how to adjust it and get it just right.
Then the ATV should no longer backfire after shutting the engine off.