It’s not for protecting the circuit from 24V, rather, in earlier versions of the circuit design, I used 5V on 74HC595, and so the resistor is there to be a current limiter between 5V and 3.3V. It didn’t turn out to be necessary, but I kept the resistors anyways.
Yes, I’ve looked at SSRs for driver. They used to be quite expensive. Now they are cheaper, so it’s certainly feasible. One thing you may want to look at is the maximum current they can drive. Some of them are quite low, like below 500mA, which would be an issue if someone wants to plug in two solenoids into one port.