Spells granted by a class, use that classes spell casting stat (So if you obtain a spell from the Wizard class it will use INT, while if you obtain a spell from Cleric it will use WIS)

The only thing to be concerned about when building a character is spells granted by an item. As those will use the spell casting stat of the last class you put a level in. (So if the last time you leveled up you gained a Wizard level, items will use INT. If the last time you leveled up you gained a Cleric level, items will use WIS)

Though, you can always use Withers to respec and reorder the way you obtain levels to make sure that the class you want is being used for item DCs. (I.e. If you wanted items to use INT but decide you want another level as Cleric, you can respec and put the extra Cleric level earlier so you end up with a Wizard as your last level up)