You've got it sort of backwards, but sort of not.
A piece made out of steel is significantly stiffer than the *same* piece made out of aluminum.
However it all depends on how you make the piece. The cross section can change everything, as can the application. *By weight*, aluminum and carbon steel have the same "stiffness", but the aluminum part has to be 3x as thick for the same weight, which causes problems in a driveshaft. The reason being, that stiffness and strength also relate to the diameter, not just the material strength - a steel driveshaft can concentrate all of its mass towards the outside resulting in a stiffer, stronger shaft (in torsion).
To make even more fun, the cross section makes a lot more difference in a twisting shaft than it does in bending (bending stiffness is a square of the radius, twisting stiffness is to the 4th power)
Flywheels are a completely different story - you can make a light flywheel from any material, but since aluminum conducts heat better and has twice the thermal capacity (so it runs cooler), it's a better choice for that reason alone, not because it's lighter or stronger.
In terms of strength to weight ratio, aluminum (6061 alloy used in driveshafts) is significantly better than carbon steel, but not as good as properly heat treated chromoly (also the advantage being, it doesn't need the same kind of heat treating post-machining).
In the end, the Aluminum driveshaft is not as strong or as stiff as a chromoly one of the same weight could be, but because it is more flexible in torsion, so it transfers less shock load to the rear axle. In a drag car where you are launching and straining the drivetrain a lot, but always under power, more flexible ends up being good. In a track car, where you are running on the edge of grip in all directions, and alternately straining the shaft in both directions repeatedly (engine braking under deceleration as well), stiffer is better, since it will be more predictable. Also, the steel has better fatigue resistance.
If that weren't enough, in driveshafts, a factor even more important that simple strength and stiffness is "critical speed", or the rotation speed at which the shaft will resonate and tear itself to pieces. This speed depends on diameter, stiffness, weight and
also tube length, which is why DSS did not make a one piece shaft. Ideally you want a lightweight, stiff, thin material with a short, large diameter shaft (Carbon fiber anyone?) for higher critical speed.
Quoting gtluke:
steel twists more than aluminum. aluminum has no flex, which is why your springs are always made out of steel.
the reason for the shaft is to reduce rotational weight. it works the same way as an aluminum flywheel. it also saves considerable weight off the car.