Expressivity of Shallow and Deep Neural Networks for Polynomial Approximation