Uni and living in Belgium / Germany

I can do Bachelor in Chemistry / Biology in Maastricht, Nijmegen, Enschede and I am going to rent something in Belgium or Germany and drive to uni everyday. Possibly work there part time as well.

Did anyone of you try to do that ?

I hold EU passport and I wonder if that all makes sense since there is a housing crisis in NL. Living in Belgium or Germany and studying in Maastricht seems ok to me.

Is that legally ok for student to live in other country ? Does anyone have any expereince regarding that ?