Large-scale evolution and extinction in a hierarchically structured environment