Leveling ground under old shed
Rather than build the retaining wall would it not be better to break out the old and crumbling foundation clean out the area. Then build up the necessary forms to permit new concrete to be poured. From the sounds of it this shed wall is easily accessed from both the inside and outside and so getting the forms built and the concrete poured should not be too difficult. 

This solution seems like it would be a lot better than stealing two feet of width all along one side of an only 16' wide shed.