Optimal investment in human capital under uncertainty