On a unique solution and stability analysis of a class of stochastic functional equations arising in learning theory