Sensitivity analysis of the value function for infinite dimensional optimal control problems and its relation to Riccati equations