Arduino Micro with SN754410NE DIP-16 H Bridge

In your code you've declared speedPin as 4 (which I presume is the pin you have connected to EN1,2 of the chip), but that is not a PWM pin on the Micro. So you need to use a different pin. On the other hand, the two direction control pins are currently 5 and 6, which do support PWM on the Micro, but you don't need PWM on those pins when you use the modified code.

The original cause of the problem was that you were getting a burst of high current between the two pinMode calls, and the power supply voltage was drooping as a result. With the modified code, you will still get a burst of high current if you switch your motors from off directly to full speed. So you will either need to use a better power supply, or a large capacitor across the power supply, or else you need to change your code so that you gradually increase the PWM from 0 to 255. For example, you could increase it by 25 every 100ms.

For the watchdog, you need to use wdt_reset(), not wdt_reset.