Yes, a spell obtained from a class will use its innate attribute for accuracy, so Cleric spells will use Wisdom while Wizard spells will use Intelligence. DC checks also use the main attribute of a class the spell is cast from, even if their DC checks vary.

Also if a spell is shared by the two classes, you can choose from which class you wish to cast it for better accuracy.