Have a look at your configuration if a either bash variables or shell options are set:
Bash Variables
(Section 5.2 in the Bash Reference Manual)
IGNOREEOF
Controls the action of the shell on receipt of an EOF character as the sole input. If set, the value denotes the number of consecutive EOF characters that can be read as the first character on an input line before the shell will exit. If the variable exists but does not have a numeric value (or has no value) then the default is 10. If the variable does not exist, then EOF signifies the end of input to the shell. This is only in effect for interactive shells.
For example IGNOREEOF=2
Modifying Shell Behavior: The Set builtin
set
allows you to change the values of shell options
(Section 4.3.1 in the Bash Reference Manual)
-o ignoreeof
An interactive shell will not exit upon reading EOF.
Getting to your question
I would like to control both independently, if possible (disable this functionality for non-login shells, for instance). Is that possible?
Yes. Scripts you source should check if the shell is a login shell and set the variable accordingly, something like this:
if shopt -q login_shell; then IGNOREEOF=10; else IGNOREEOF=0; fi
Note the value of 10
still allows you to leave the shell with Ctrl+D; you just need 11 consecutive strokes of it.