Use a PWM or other controller for 24V/500W application
You've got the right idea with PWM, but relays are totally inappropriate as the switches in this case.  You want to run the PWM at least a fw 100 Hz, and that would be slow.  That's fast enough for the motor to work well enough, but could cause audible whine.  That is why most motor controllers pulse at 25-30 kHz, just past the audio range.

Probably the best way to switch the voltage to your motor is with a low side FET, or perhap several in parallel.  Use good FET gate drivers intended for that purpose, and control those from the PWM output of your microcontroller.

A starter motor is not really a good fit for what you are trying to do, but you should be able to get some results like you expect.  In general, start motors take a lot of current, have high torque, but aren't meant for sustained operation in several ways.