After doing some research on the topic and some fruitful discussion with Mike, I think I have a good idea on how the Route Targets are assigned. So I decided to answer my own question.
Quoting from Mike's answer
Route-targets are used to implement VRF route import and export policies for a VRF on a PE router.
The problem arises when we have a PE router sending control plane information received from a site belonging to multiple VPNs. There should be some way for the PE to decide which route target (thereby signalling to which VPN this control information belongs to) to assign to the BGP control packet it sends.
The important point to be noted is that VRFs are configured on particular interfaces and Route Targets are configured for interfaces.
So, if we have a site that belongs to, say, 3 VPNs, the site's CE and the corresponding PE should be connected via 3 different interfaces (or sub-interfaces) and a specific route Target assigned to each interface (or sub-interface).
Regarding my other question
Are the route targets to various VRFs manually installed in all the PEs?
From what I had gathered from searching online, Route targets are indeed configured manually on the routers.