I notice that when I pedal that I mostly seat the pedal in the arches of my foot naturally. I also notice that the cycling shoes tend to seat the cleats in the balls of the foot area, as do other cyclists. I was curious about the justification or pro/cons of either. When I try to pedal in the balls of the foot location I find it a bit better to be aggressively pedaling, but my foot slowly drifts back to the arches position. I ride flat pedals only.
The ball of the foot gives a large, strong, stable area to use on the pedal, and gives you a nice lever to use your muscles effectively. Conversely, the arch of your foot is soft, elastic and not stable.
Picture your foot as you walk slowly barefoot, you push down hard on the ground with the ball of your foot, and the arch acts as a big rubber band to help spring the heel up and launch you forwards. You can walk or run solely (ahem) on the balls of your feet, without using your heel, thanks to this elasticity.
So what... Well, the ball of the foot is a strong, stable fulcrum for your foot while the arch is not, which is why you've noticed the ball is a better location for "aggressively pedalling" i.e. better power transfer. You probably also recruit lower leg muscles more naturally and powerfully using the ball.
I don't know if there is risk to you using the arches on the pedals (maybe someone else does) but there are definitely benefits in learning to use the balls of the feet. You'll use your joints and muscles more naturally, be more powerful for the effort you put in and look super cool too.
When you push the pedal down your calf muscles have to work to keep your foot roughly parallel to the ground.
Placing the foot forward on the pedal, near the ball, increases the lever your calves have to work against. Placing the pedal further aft on you foot, towards the arches reduces the lever, and in turn the strain on your calves.
There are a couple of consequences that make both positions useful for different riders.
For high power output over a short time it might be better to place the forefoot over the pedal axle (keep it still behind the first two metatarsal heads). As this allows another muscle group, calves to push through the stroke.
For endurance placing the foot further aft, towards the arches, has several advantages. One may expect the calves to tire more quickly than thigh muscles (less muscle volume). There is also an argument that calf muscles are not as well provided with oxygen and nutrients since they are further 'downstream' in the cardiovascular system. (I did not find reliable sources, and am sceptical about that.)
Foot placement further aft also allows a more powerful downstroke. Contrary to cyclings old traditions, where a 'round' stroke is considered an ideal, it is much more efficient to apply force to the cranks at angles where the mechanical advantage is best, ie at the downstroke.
Most cyclists with clipless pedals tend to mount their cleats too far forward on the foot. One may observe that when watching cyclists form on popular climbs: Fatigue of calf muscles leads to heel drop. During the downstroke the heel drops below level. Taking away force from the downstroke. Riders sometimes compensate this by pointing the forefoot downward all the time. Both are very visible from the side.
What may be a consequence for you?
Please consider to ride as you like, without any attempts to train yourself to use a different foot position. Your foot hurts because of pushing near the arches, where the foot is not as strong, as Swifty pointed out in their answer. If that happens, move your foot further forward. (For example, I have to place my cleats too far forward, otherwise I get unbearable pain in my right foot.)
Since you are riding flats you don't even need to think about foot position. You will simply get to the optimum position by feel.