You could use ParametricNDSolve[] and parametrize y with additional parameters maybe even using a or b and then subtract the solution from actual data and NMINIMIZE the squared sum of that subtraction.

This is least squre fit method adapted for differential equations attempting to fit an actual data.

Dara