The Last Cuentista by Donna Barba Higuera

It's 2061, and a comet is about to hit Earth, wiping out the world's population and making the planet inhabitable. Only a privileged few get the opportunity to go to space and live on a new planet. Twelve-year-old Petra Peña and her family are given this rare opportunity because her parents are scientists who will be able to help make the new planet habitable for humans. The catch is that getting to the new planet, Sagan, will take 380 years, so Petra, her brother Javier, her parents, and the many other passengers on the ship will be put in a cryogenic sleep until they reach the new planet. When Petra wakes up, she realizes something is wrong immediately. Instead of waking up and seeing her family, she realizes that everyone on the ship is now brainwashed. Her family is gone and the ship is now ruled by The Collective, which is determined to erase all information about and artifacts from Earth. Petra is the only one who remembers Earth and the stories her grandmother told her....