Surrogate-Based Differentiable Pipeline for Shape Optimization