Yes, when you clear all save data from your game and start fresh; even if you did have illegal Pokemon in that save file- it is all gone now! Anyways, unless your game itself isn't an illegal copy or its not on a flashcart, you'll be fine and your new save file is clean of anything suspicious!