Optimal capacity expansion requires complex decision-making, often influenced by technology learning, which represents the reduction in expansion cost due to factors such as cumulative installed capacity. However, having perfect foresight over the technology cost reduction is highly unlikely. In this work, we develop a multistage stochastic programming framework to model capacity planning problems with endogenous uncertainty in technology learning. To assess the benefit of the proposed framework over deterministic optimization, we apply a shrinking-horizon approach to compute the value of stochastic solution. Further, a decomposition scheme based on column generation is developed to solve large instances. Results from our computational experiments indicate substantial potential cost savings and the effectiveness of the proposed decomposition algorithm in solving instances with large numbers of scenarios. Lastly, a power capacity planning case study is presented, highlighting the stochastic optimization's ability to anticipate significantly different expansion and production decisions in low- and high-learning scenarios.