When you say CDN endpoint do you mean a CDN other than Cloudflare? Assuming yes…
There are lots of ways you could do this including Workers. With a worker you could just add route to a simple worker script that upstreams to your CDN.
You could also define a Load Balancer in Cloudflare with a default rule to route everything to your Cloud LB and a custom rule to send /assets to the CDN:
You can also do this using Origin Rules but you’d need an Enterprise plan to override the DNS (which is what you’d need to switch between your Cloud LB and CDN):