Gauge hierarchy generation and cosmology in locally supersymmetric guts