Before I start, let me encourage you to build a rack that is 4' tall. If you're building it yourself you won't be using any more material as lumber comes in 4' increments. Also, it will allow you to have the cornsnakes lower in the rack where it will be cooler (more on that later).
Also, it gives you room to expand in you get more snakes (happens to all of us).
But to your question...
It is possible to house them in the same rack.
You have several options. Note that not all of these options are mutually exclusive. It may be that you have to employ several of them to achieve your desired temps. Without knowing more details it is hard to recommend any combination of these options.
First, I'm not all that certain that cornsnakes will suffer at the temps required by ball pythons. It may not be ideal, but I think you could keep them at the same temps while you fiddle with some of my recommendations to get temps where you want them.
**First option**
I assume (hope) you're using a fairly large box for your ball python and not a typical 28 qt. to 32 qt. sweater box.
If so, one option will be to simply keep the cornsnakes on the lower shelves and run the heat tape vertically up the back. The upper most shelves will naturally be the warmest since heat rises. And due to the longer box the cornsnakes will have more opportunities to get away from the heat, if it is indeed still too warm on their shelves.
**Option 2**
You could also use attach some sort of heat shield to the back of the cornsnake tubs to reduce the amount of heat the cornsnake tubs receive.
If you want to use "belly heat" you'd have to attach some sort of material to the bottom of the cage to reduce heat transmission into the cage.
Whether you use belly heat or heat tape on the back will be partially determined by how cold the temp. in your room is. If it's in the 60's during the winter "belly heat" may be a better option.
**Option 3**
This option will work well with the "ladder rack" design. This design will not maintain heat well due to the open sides and back and you can use this to your advantage.
Keep the ball pythons on the upper most shelves and fill in the side gaps and the back of the rack with pieces of foil covered styrene insulation. On the cornsnake shelves, leave the back and sides open. This will cause the cornsnake shelves to lose some heat, thereby being cooler. How much this works will again depend on several factors that you'll have to observe.
**Option 4**
Use ultratherm heat pads. It will be more expensive but since you only have 4 snakes it's probably the easiest. Simply buy separate heat pads for each tub and control them individually with a rheostat.
**Option 5**
Similar to option 4. Use heat cable wrapped through grooves routed into the shelves. Simply wrap more coils underneath the ball pythons that the corns.
If one is too hot, simply remove a coil. Conversely, if one is not hot enough, add another coil.
Hope this gives you some ideas.