In the Gaussian sequence model Y = θ0+ε in Rn, we study the fundamental limit of statistical estimation when the signal θ0 belongs to a class Θn(d, d0, k) of (generalized) splines with free knots located at equally spaced design points. Here d is the degree of the spline, d0 is the order of differentiability at each inner knot, and k is the maximal number of pieces. We show that, given any integer d≥0 and d0 ∈ {-1, 0, ..., d-1}, the minimax rate of estimation over Θn(d, d0, k) exhibits the following phase transition: inf~θ supθ∈n(d,d0,k)Eθ‖~θ - θ‖2 ≍ d {k log log(16n/k), 2 ≤ k ≤ k0, k log(en/k), k ≥ k0 + 1. The transition boundary k0, which takes the form ⌊(d + 1)/(d - d0)⌋ + 1, demonstrates the critical role of the regularity parameter d0 in the separation between a faster log log(16n) and a slower log(en) rate. We further show that, once encouraging an additional ‘d-monotonicity’ shape constraint (including monotonicity for d = 0 and convexity for d = 1), the above phase transition is removed and the faster k log log(16n/k) rate can be achieved for all k. These results provide theoretical support for developing ℓ0-penalized (shape-constrained) spline regression procedures as useful alternatives to ℓ1- and ℓ2-penalized ones.