Bernoulli is only an energy conversion equation, need the Energy equation with friction and other irreversible processes.
The transition for flow leaving the smaller pipe suddenly at its end in the larger pipe is gradual over a distance from the small pipe end and it depends on diameters, flows...