  We consider a class of linear time dependent Schr\"odinger equations and
quasi-periodically forced nonlinear Hamiltonian wave/Klein Gordon and
Schr\"odinger equations on arbitrary flat tori. For the linear Schr\"odinger
equation, we prove a $t^\epsilon$ $(\forall \epsilon >0)$ upper bound for the
growth of the Sobolev norms as the time goes to infinity. For the nonlinear
Hamiltonian PDEs we construct families of time quasi-periodic solutions. Both
results are based on "clusterization properties" of the eigenvalues of the
Laplacian on a flat torus and on suitable "separation properties" of the
singular sites of Schr\"odinger and wave operators, which are integers, in
space-time Fourier lattice, close to a cone or a paraboloid. Thanks to these
properties we are able to apply Delort abstract theorem [Del10] to control the
speed of growth of the Sobolev norms, and Berti-Corsi-Procesi abstract
Nash-Moser theorem [BCP15] to construct quasi-periodic solutions.
