We have a subpanel in the upstairs hallway. Other side of wall is bedroom. We need to install an in-wall heater (cadet), outlet, and wall light in the bedroom on that same wall. I know about the 30" and 36" clearance rule, but this is more about have electrical boxes close to the subpanel. Is it ok to have the inwall heater in the same bay as the subpanel? If not, how far away should everything (especially the heater) be?
You're fine, as long as you don't cook the subpanel that is
The clearance rules for electrical equipment (NEC 110.26(A)) start at the front of the electrical equipment and extend out from there, as they're intended to provide the electrician with enough space to work on it without having to perform a contortionist act. This means that having the subpanel share a stud bay with other stuff is fine.
You do have to make sure that the in-wall heater doesn't raise the subpanel above about 40°C though, otherwise the ampacity of the breakers needs to be derated to prevent false tripping due to excessive heat. If the heater is trying to overheat the subpanel, sticking a rockwool batt into the stud bay between the heater and the subpanel should solve the problem and obviate the need for breaker derating.