To the OP, 45 minutes should be fine at MDW. Here are some things you can consider.
Check in as early as feasible.
You get your MDW-PHL BP when you check in for the OAK-MDW segment. You will be departing from the west coast, so T-24 check-in time for OAK will be earlier than T-24 for almost any other flight connecting at MDW. You should get a good boarding number if you do this. Pay for Early Bird if you're the type who doesn't like to take chances.
The day of the flight, you will be able to tell if the OAK-MDW segment is running on time. If it looks like you're cutting into your 45 minute connection, then use the good boarding number that you got by checking in early to select seats nearer to the front. Only you can decide if getting two seats up front is better than getting to sit together in the rear, bulkhead vs. exit row, aisle vs. window, etc.
If it's on time, you are OK. You don't have to worry.
If it's a short (less than 45 min.) delay, you will have to hurry. Worry if you want.
If it's longer than 45 minutes, you will miss your connection anyway and they will reschedule you. You don't have to worry here either.
The first segment is going to be the longer one, so keep that in mind, too. It's probably less of an issue if you have to split up for the shorter one.