Using data off Navweapons and wikipedia:
Speed: 19.5 vs 22 knots "on paper"... actual speeds after losses in performance due to age and time out of dry dock uncertain. Probably close enough that it won't be that significant.
Fire Power: 2 by 6in (ROF 5-7 rounds/min, 45kg shell) and 6 by 4.7in (ROF 5-6 rpm, 20kg shell) vs 10 by 105mm (up to 15 rpm, 17kg shell).
Assuming both ships can maintain the highest rates of fire specified above, Leipzig can throw twice the weight of shells as Rainbow. So, in the very crudest of approximations a massive advantage to Leipzig. Of cause in real-life it's a bit more complex than that (are six inch shells arriving less frequenctly more or less efficient than 4.1in chells arriving more often?), but still likely a significant advantage to the Krauts.
Range: QF 6in 40 calibre, range of 9,100m at 20deg elevation or 13,700m at 30deg elevation (not sure what elevation the mounts on Rainbow were limited to); 4.7in Mk I-IV, range of 9,100m at 20deg elevation, 11,000m at 24 deg; 105mm SK L/40, 12,000m at 30 deg.
Minor edge with Rainbow's six-inchers, but only two of them; minor edge for the Leipzig's 105mm over the 4.7-inchers. Kinda dubious either vessel has the fire control capabilities to use "long" range fire to good effect, expect it'd actually end with a 5-8,000m range slugfest.
Crew Quality: Rainbow pre-war as used as a training ship, so, I would speculate had to draw upon a lot of new crew members to fill her complement out when war started... she's likely not not well worked up and her crew poorly trained. Leipzig is fresh from having served with the German Pacific Squadron, her crew will be properly worked up and well trained. Distinct advantage to Leipzig.
Armour: 2in protected cruiser style deck over vitals plus coal bunkers vs 80mm deck plus coal bunkers. On paper advanatage to Leipzig... in reality, well, quite a bit of uhming and ahhing over if protected cruiser type arrangement (sloped "deck" armour mounted deep in the ship) is better than the more modern arrangement (flat deck armour mounted high in the ship)...
Looks to me like odd are very much in Leipzig's favour.