Will a magnetic flashlight attached to a metal junction box cause problems?
Short answer: No. 

Long answer: Nnnooooooo. 

Serious answer: A permanent magnet, even one a thousand times stronger than the one holding your flashlight in place, placed near your home wiring but not moving has no effect on the circuit at all. A permanent magnet as small as the one on your flashlight, when moved around near your home wiring (eg. when you take the flashlight and put it back), will theoretically generate tiny surges of current in the wires. In order to measure those surges you would have to be a very careful physicist. 

A magnet moved around near a metal junction box will generate tiny surges of current in the box walls. In order to measure those surges you would have to be a very careful physicist with pernicious insomnia. Theoretically a tiny amount of magnetic influence makes its way into the interior of the junction box, via screw holes etc. In order to measure those surges you would have to be a very careful physicist who is going through a bad divorce and expects to never sleep again. 

All this is of no practical consequence. Any magnet you would have around the house cannot interfere with your domestic electric supply.