FCC (or FAA, can't remember, that's systems engineering's job) mandates that all satellites, including cubesats, be able to deorbit within 5 years of the end of their mission with some confidence rate (90%, iirc).
Almost all cubesats are launched at about a 550km x 550km orbit or lower circular orbit. Cubesats (most satellites, in fact) will deorbit naturally within a few years (almost definitely <= 5Y) at that altitude due to orbit decay, mostly from drag.
Now, some cubesats will have onboard propulsion, which they'll use to extend their mission by burning back into higher orbits, allowing them to still naturally decay at the end of their mission. Indeed, they can even use remaining propellant to speed their orbit's decay.
I've participated in the design or manufacture or launch of dozens of cubesats. The ones with RPis as their flight computers either accept that they'll get messed up by radiation with some regularity throughout their mission (and design other components accordingly, such as timeout watchdog resets), or accept that they'll have a quite limited mission lifetime.