Fairly common what the OP wants to do.
Where the arrow is drawn, that foundation wall sits on a footing. I like cast in place concrete walls but you could do CMU's. This wall could stop at the upper slab elevation or continue higher with a raised stem. If it stops at the upper slab, the upper slab could sit on top of it. If a raised stem, then install a slab ledge on the wall. My preference is a raised stem.
The uphill side of this wall is water proofed, drain tile is installed, and gravel with filter fabric is installed. This protects the lower side from water intrusion. This drain tile runs thru the footing and is day-lit if possible or will run to a sump crock at the lower slab.
The upper slab near this wall will be on compromised soil due to the excavation for this wall and presumably your original sloping grade. You have 2 options for this slab that I see
- Structural slab ($$$)
- Backfill fully with #57gravel then install a slab on grade (usually cheaper - more $ for gravel but less $ in the slab, less $ overall)
This picture shows a raised wall with a slab ledge for the uphill slab. Note the water proofing to protect the downhill structure.
This picture shows conventional draintile installed on the uphill side of the foundation wall. Note the waterproofing up to the slab ledge.
This picture shows that the overdig area for the foundation wall has been backfilled with #57 gravel. The gravel provides structural support for the slab at the overdig region while the remainder of the slab is supported on bearing soil.
Normal slab on grade prepped and poured for the uphill and downhill portions.
Hope this helps.