Does anybody know any good references to look into which methods are possible to use in stan to estimate the parameters of an ODE system? (e.g., from GAM models including different splines, to other non-linear statistical methods). Since we use an specific command in R when estimating these statistical models, how could I specify this for the estimation of a parameter in Stan?

You can estimate parameters from a system of ODEs directly by implementing it in stan and using a solver to compute a prediction that will then be evaluated as a sample of the MCMC.

There is some documentation and case studies out there.

Unless there’s a reason why this approach is not feasible, I’d say it’s better than using indirect methods that would have to somehow (but probably not trivially) be related back to the original system.