Switch to your Greek input method and evaluate
(setq greek-map (quail-map))
Switch to your standard Latin input method and evaluate
(quail-defrule ",." greek-map)
Now, if you type ,.a, that will produce an alpha, &c.
Short answer: C-u C\ spanish-prefix RET. The characters you mentioned can then be typed as
~? => ¿
~! => ¡
Long answer: read the emacs documentation starting at Language Environments, plus the description of 'spanish-prefix' in lisp/leim/quail/latin-pre.el to see what other characters that method supports, and to see what other input methods are ...