It would be possible to run squid in your network namespace if systemd allowed running processes in named network namespaces. See https://github.com/systemd/systemd/issues/2741, it looks like that is a won't fix. However, there are some workarounds listed there.
Alternatively you can run squid in the default network namespace and use tcp_outgoing_address set to the IP address of a tunnel into your net namespace. Then use policy routing (ip rule) to set the default route via the vpn/ network namespace for traffic originating from that IP address.
You don't actually need a network namespace at all; as long as your vpn does not replace your main default route, you can use policy routing to set a default route via the VPN for traffic that comes from your IP address on the vpn. This works well if you have the same IP address every time on the VPN.
systemctl start openvpn
ip route add default via 192.168.0.1 table vpn1 (# where 192.168.0.1 is the remote gateway IP on the VPN)
ip rule add from 192.168.0.99 lookup vpn1 (# where 192.168.0.99 is the local IP address on the VPN)
tcp_outgoing_address 192.168.0.99 [[!]aclname] ...
(Use squid acls to select the traffic you want to go via the VPN).
You can use the same technique with a named network namespace, which allows this to work even in the local and remote IP addresses on the VPN change. In that case you need to set up nat/masquerading in the namespace, and a tunnel between the default namespace and the VPN namespace. In this case, then tunnel will have static IP addresses that you assign, so that will work around the dynamic IP addresses assigned by the VPN.