We can develop a crude model of this that captures the main essence of what is happening. Basically, the key mechanism involves transient heating of the pipe carrying the fluid. Once the pipe reaches its final temperature, the water temperature coming out of the pipe will no longer be changing.
Even though there are many effects occurring simultaneously, such as heat transfer from the pipe to the surroundings, the key focus is on the fluid and its thermal interaction with the pipe. So, in this model, we assume that the outside of the pipe is fully insulated. We also assume that the flow is turbulent, so that the water velocity profile in the pipe is nearly flat.
Let v be the velocity of water through the pipe
Let $\rho$ be the density of the water
Let C be the heat capacity of the water
Let $C_P$ be the heat capacity of the pipe
Let A be the cross sectional area of the pipe available for flow
Let m be the mass per unit length of pipe
Let S = $\pi D$ be the heat exchange area per unit length of pipe
Let $T_W(x)$ be the water temperature at axial location x along the pipe
Let $T_P(x)$ be the pipe temperature at axial location x along the pipe
Let h be the heat transfer coefficient from the water to the pipe
First we do a transient differential heat balance on the fluid in the section of pipe between axial locations x and x + $\Delta x$. The rate of heat flow into the section of pipe is equal to $v\rho AC(T_W(x)-T_0)$, where $T_0$ is a reference temperature. The rate of heat flow out of the section of pipe is $v\rho AC(T_W(x+\Delta x)-T_0)$. The mass of fluid in the section of pipe is $\rho A\Delta x$, and the rate of accumulation of heat in the section of pipe is $\rho AC\Delta x(dT/dt)$. The rate of heat loss from the water to the pipe is given by $Sh\Delta x(T_W-T_P)$. If we combine all this into a heat balance on the section of pipe, we obtain:
$$\rho AC\Delta x(dT/dt)=v\rho AC(T_W(x)-T_0)-v\rho AC(T_W(x+\Delta x)-T_0)-Sh\Delta x(T_W-T_P)$$
If we divide this equation by $\Delta x$, and take the limit as $\Delta x$ approaches zero, we obtain:
$$\rho AC\frac{\partial T_W}{\partial t}+v\rho AC\frac{\partial T_W}{\partial x}=-Sh(T_W-T_P)$$
A similar heat balance on the section of pipe between x and x + $\Delta x$ yields:
$$mC_P\frac{\partial T_P}{\partial t}=+Sh(T_W-T_P)$$
Note that, unlike the fluid heat balance, this heat balance on the pipe does not include a flow term.
If we assume that the heat transfer coefficient h is very high so that, at any cross section, the water temperature $T_W$ and the pipe temperature $T_P$ are nearly equal, we can add the two equations together an obtain:
$$(\rho AC+mC_P)\frac{\partial T}{\partial t}+v\rho AC\frac{\partial T}{\partial x}=0$$
where T now represents both the local water temperature and the local pipe temperature. If we divide this equation by $(\rho AC+mC_P)$, we obtain:
$$\frac{\partial T}{\partial t}+v^*\frac{\partial T}{\partial x}=0\tag{1}$$
where $$v^*=\frac{v}{1+\frac{mC_P}{\rho AC}}\tag{2}$$
Eqn. 1 is the equation for a thermal wave traveling down the pipe with a velocity v*. At time t, the leading edge of the wave is at x = v*t. Behind the leading edge, the temperature throughout is the hot water temperature entering the pipe. Ahead of the leading edge, the temperature is the original cold temperature before water started flowing.
Eqn. 2 tells us that the thermal wave travels at a velocity substantially slower than the actual fluid velocity v. This is due to the thermal inertia of the pipe. So the hot water starts arriving at the shower at a somewhat later time than the transit time for the water flow from the hot water heater to the shower.