Scalable Hierarchical Algorithms for stochastic PDEs and UQ