The COVID-19 pandemic initially resulted in an unanticipated and near-universal shift from in-person to virtual instruction in spring 2020. During the 2020-21 school year, schools began to re-open and families were faced with decisions regarding the instructional mode for their children. We leverage administrative, survey, and virtual-learning data to examine the determinants of family learning-mode choice and the effects of virtual education on student engagement and academic achievement. Family preference for virtual (versus face-to-face) instruction was most highly associated with school-level infection rates and appeared relatively uniform within schools. We find that students who were assigned a higher proportion of instructional days in virtual mode experienced higher rates of attendance, but also negative student achievement growth compared to students who were assigned a higher proportion of instructional days in face-to-face mode. Students belonging to marginalized groups experienced more positive associations with attendance but were also more likely to experience lower student achievement growth when assigned a greater proportion of instructional days in virtual mode. Insights from this study can be used to better understand family preference as well as to target and refine virtual learning in a post-COVID-19 society.