Learning for Layered Safety-Critical Control with Predictive Control Barrier Functions