Asymptotic behaviour of the minima to a class of optimization problems for differential inclusions