If you consider a fixed rate at which the pool gets heated then this is a pretty easy formula, or? But what do you want to do with this… want to know when to switch off the pool heating? Then you could use the pool temp as well…for now it seems you are making it complex but maybe I am missing the point as to what you want to achieve
Easy: You turn the pool on, and when the kids ask you, you can say “in 2 hours”
It’s more of a “when is the pool ready” indicator for humans.
The automations are already there, with outside temperature, excess energy, rain probability et all.
so… example:
target: 28
current: 23
rate: 1.2 /h
ready in hours: (target - current) / rate
this is not that complex with a template sensor
you can also add the hours to the current time so indicate both time and how long
… seeing you already have automations, I would guess you know this … otherwise… not sure if my view is too simple