Do Not Design, Learn: A Trainable Scoring Function for Uncertainty Estimation in Generative LLMs