Hierarchical model that's partly expensive and non-analytic

Stan AFAIK can’t do splines internally - you would have to implement that yourself, but it should be possible to do it in Stan, without resorting to C++. I honestly don’t even really know how multidimensional splines work, but a quick Google turned up some descriptions that look feasible at first glance. It’s likely not gonna be simple, but likely feasible and not extremely difficult.

I only have experience with univariate splines in Stan and those are +/- easy and code is available so you might be able to start off of that (https://github.com/milkha/Splines_in_Stan). There is also a Stan example with sparse splines representation (where most coefficients are 0) which might be helpful if you end up with a lot of splines (see Spline fitting demo inc comparison of sparse vs non-sparse)