Let me preface by saying you may have set on a path more adventurous than you had hoped... Mesh generation itself is often a bottleneck, let alone rigorous 4D adaptation of complex geometries powered by GPU. I have written in bold a few keywords which may prove helpful to search on scholar.
From my limited knowledge, here are a few (free) mesh adaptation libraries/pieces of software:
- Inria's MMG (2D/3D simplices).
- NASA's Refine (2D/3D simplices).
- Avro (2D/3D/4D simplices & possibly quads/hexaedra).
These three are of the metric-based variety. A metric field (solution field of spd matrices) prescribes sizes and orientations for elements locally. Each of these remeshers then constructs a uniform mesh, in a space distorted by these metric fields.
These metric fields are derived by error estimators. The most basic rigorous error estimate controls the $L^p$ norm of interpolation error, these are also called multi-scale estimates (because of $L^p$ as opposed to $L^\infty$ capturing only largest scale variations), and part of sometimes called "Hessian-based mesh adaptation". This is because the driving error term (on linear meshes) of Lagrange $P^1$ interpolation error depends only on the Hessian of the considered solution field (which, in practice, is reconstructed numerically). See for instance A decade of progress on anisotropic mesh adaptation for computational fluid dynamics and references therein.
More advanced error estimators called goal-oriented or output-based control a functional of interest (say drag or lift) see e.g. here and here, or rely on local solves to provide generic a posteriori error estimates (which could prove more robust than a priori interpolation error estimates in the case of hyperbolic equations). See for instance here for results using these techniques (a posteriori goal oriented adaptation for CFD).
I believe at least MMG and Refine are capable of computing an optimal metric field for interpolation error directly from solution fields. For vector fields, I believe the standard is to compute a metric per component and to apply metric intersection.
If I understand correctly, you want space-time adaptation. Avro may be best suited to this, as it handles 4D meshes. However, I believe it only handles faceted geometries, and I don't know whether it implements any space-time error estimation, or if that's up to the user. I'm not very optimistic as to the fact another free piece of software will provide you with this capability either. Perhaps you will find this relatively simple method for interpolation error control or this one for an output error control reference helpful in implementing your own if you fail to find a ready solution. In these cases, space-time adaptation is done by, morally, adapting in space at each time step. Some "non-linearity" may be present, in that iteration cost targets may take into account the time evolution of the problem.
If you can opt for a non-conforming numerical scheme on quads, you can instead consider AMR libraries such as p4est or SAMURAI. To represent the geometry, you could either (least geometrically accurate solution) cut out elements intersection/outside the domain or (perhaps better but more involved) consider immersed boundary methods. In the latter, you compute explicitely the intersections between mesh elements and the boundary and apply a special treatment to those elements (i.e. modify the scheme).
A note regarding AMR; if the idea seduces you but you do not wish to implement a scheme on non-conforming meshes, and think hexaedra (or even quadrilaterals) may prove a decent comprise, I urge you to reconsider. For all their apparent simplicity, making meshes out of these elements is even more of a nightmare than out of triangles or tetrahedra.
Regarding boundary-layers specifically, you will most likely see them appear naturally using any of the above error estimator types, as evidenced by the numerical results in the linked papers. Still, it is not uncommon to be able to specify boundary-layer regions, in which case the remesher will generate them using frontal methods resulting in nice quasi-structured boundary-layers.