Getting the confidence interval or some sort of range for predictions from optimizations I am trying to calculate range for my model predictions after performing optimization and getting values of the optimized parameters.
I am aware that we can get a standard error of the optimized parameters (e.g., for a linear model with the inverse of the diagonal elements of the hessian) as shown in here
My question is how can I use the hessian information or any other information returned after optimization to provide a confidence or prediction interval or some sort or error metric in my predictions from the optimized parameters.

Getting information about the robustness of your parameter estimations is usually very difficult and depends very much on your method. That's why it is usually not done.
Note that the accepted answer of the post you referenced is not correct: the Hessian is in general not the inverse of the covariance matrix. The second answer thereof by @Danica is more correct: Using boosting methods is usually your best shot, provided you can afford it.
You could use Cramer-Rao to use the loglikelihood to compute a lower bound of the estimator bias.
Also, note that in general, you cannot compute tight confidence sets from variances or the other way around.
