Shape Optimization by means of Proper Orthogonal Decomposition and Dynamic Mode Decomposition