Critical dimension for quadratic functional quantization