THE ROAD to pandemic recovery must run through summer, when programs draw on young people’s interests to help them learn.

The steep decline in student test scores is concerning but just the tip of the iceberg in measuring pandemic losses. Researchers estimate that the loss of earnings for Massachusetts students alone will be $21 billion. The toll of alienation from peers, teachers, and the learning process, coupled with diminished motivation and inspiration, is more difficult to measure but has profound consequences.

It is discouraging to see a generation of students falling behind, but it is heartbreaking to witness the psychological and mental health setbacks they have endured. These unacceptable consequences must be mitigated immediately.

Treating these problems directly with technical solutions like tutoring, more time in school, and more focus on tested subjects may well help those who opt to participate. But what about those who opt out, psychologically or physically? Many students won’t be inclined to take advantage of tutoring. Others have strayed from school altogether. So many are struggling to re-establish some form of normalcy in their young lives.

We must actively reconnect students to the excitement of learning by tapping into their interests. Summer programs engage students based on what they want to do while addressing academics, mental health, and relationships. By embedding academics and skill building in activities that children actually want, we provide them with what they need to rebound more motivated, confident, and curious.

Summer learning is a proven strategy to close gaps in achievement and access to enrichment between low-income youth and their wealthier peers. Unequal summers produce differences in opportunity and outcomes, the negative consequences of which are well-documented. The gap in family spending on enrichment has nearly doubled over three decades. When compounded with the pandemic, these differences put low-income children at a severe disadvantage through no fault of their own. If we are to restore social mobility, increase equity, and level the playing field for success, then summer learning is not optional, it’s essential.

Why should only affluent families have the prerogative to provide their children with high quality summer learning? Thankfully, public, philanthropic, and nonprofit leaders are beginning to invest in summer learning at scale, recognizing that it is critical to an equal opportunity education system. Federal, state, and local investments in summer learning must become the new normal, not only to help children recover from the pandemic, but also to restore social mobility and deliver on the promise of a fair and excellent education for all.

Imagine if every young person could participate in a summer program of their choice. This goal is more attainable and affordable than one might think. Many privileged families already enroll their children in programs, accessing an impressive array of opportunities. We can build on this foundation, using federal ESSER, state Fair Share, and other funds, to expand our capacity to serve students. Whether boxing, acting, sailing, or dance, there’s something for everyone, a lens for learning, and a reason to show up.

Boston’s experience shows that providing a valuable “summer for all” is within reach. Through the 5th Quarter of Learning, Boston Public Schools and Boston After School & Beyond create thousands of slots in enrichment programs. Teachers work with youth part of the day, and enrichment staff take over the rest of the day.

A national longitudinal study of this approach by RAND reveals that high-attending students in a five-week program outperformed their peers in math, language arts, and key skills. There is a clear effect in math after just one summer. The academic advantage after two summers is estimated at 25 percent of a school year. At just $10 per student per hour, this is an enormous return on investment.

Boston’s approach is taking shape in cities such as Springfield, Massachusetts, San Diego, and Philadelphia, all of which are mobilizing their natural, cultural, economic, civic, and neighborhood resources, from zoos to outdoor nature preservations, to engage young people in learning that meets their needs while exciting them.

It’s time to come together as communities, not just schools, for a new educational compact: a guarantee that all students, and all means all, have access to essential, high quality summer learning.

Chris Smith is the executive director of Boston After School & Beyond. Paul Reville is a professor at the Harvard Graduate School of Education, a former Massachusetts secretary of education, and a Boston After School & Beyond board member.