Do a 75% water change and gravel clean the substrate every day for a couple of weeks or until we work out what is going on.
Make sure any new water is free of chlorine/ chloramine before it's added to the tank.
-----------------------
Flashing is rubbing on objects in the tank. You will know it if you see it. The fish rubs up against rocks, plants wood or ornaments in the tank. It is usually associated with external protozoan infections.Do you see the corydoras flashing off of any objects?
I do not think this is a protozoan infection and is more likely something in the water irritating the fish.
-----------------------
If you move established filter media/ material into a new tank, you can normally add fish the following day because you move the beneficial filter bacteria across with the media.