It's a complex question because both cartridges are loaded with a wide variety of bullet types and velocities. Some bullets expand more easily and aggressively than others and, for a given bullet, the faster you drive it the more aggressively it will expand.
That being said, assuming that we're talking about comparable loadings, comparable bullet types, the same weight bullet, and the same manufacturer, I would expect the .357 Magnum to have the most expansion even from a shorter barrel because it will still likely have significantly higher velocity than the .38 Special even from a longer barrel.
For example, Speer lists their 125gr Gold Dot .357 Magnum loading at 1450fps while their 125gr .38 Special +P loading is listed at 945fps both from 4" barrels. Even fired from a 3" barrel, I would be extremely surprised if the .357 Magnum loading were any slower than 1200fps and 1250-1350fps seems more likely as most short barrel chronograph tests I've seen have full-power 125gr .357 loadings in the 1200-1250fps range from a 2-2 1/2" barrel. Even at that reduced velocity, the .357 Magnum would still be going at least 250fps faster than the .38 Special is from its full 4" barrel.