The capstone ability of the Rainbow Servant prestige class states:
Cleric Spell Access: A 10th-level rainbow servant can learn and cast spells from the cleric list, even if they don't appear on the lists of any spellcasting class he has. Such spells are cast as divine spells if they don't appear on the sorcerer/wizard or bard spell lists. This class feature grants access to the spells, but not extra spells per day. The 10th-level rainbow servant can likewise read scrolls with cleric spells on them and use wands and staffs that contain cleric spells.
(Rainbow servant prestige class description, Complete Divine pg. 56)
I see no reference to limiting the spells being added to any one class, and per my previous question on class features in gestalt, it seems that both "sides" of the gestalt would indeed benefit from the Cleric Spell Access class feature.
First part
Would a Gestalt Beguiler 6/Rainbow Servant 10//Wizard 16 be able to both:
- cast spells from the cleric list with their Beguiler spell slots, and also
- prepare/cast spells from the cleric list with their Wizard spell slots?
Of course, while (arguably) the Beguiler "side" would get the spells automatically, the Wizard "side" would have to copy them from other spellbooks or scrolls. But even if the Beguiler "side" doesn't "get" them automatically (but has to learn them in some way), can both "sides" now cast cleric spells (some as divine spells), once added to spells known?
Second part
Here, we assume that:
- The Wizard "side" now can "learn and cast spells from the cleric list"
- The Beguiler "side" can, at least through Advanced Learning, get access to cleric spells
And here comes the next step; could the character use the Scribe Scroll feat to write down spells known as a Beguiler, including spells from the cleric spell list, onto scrolls to be copied into the Wizard spellbook?
Benefit: You can create a scroll of any spell that you know. [...]
Spells Copied from Another’s Spellbook or a Scroll
A wizard can also add a spell to her book whenever she encounters one on a magic scroll or in another wizard’s spellbook. [...]