When I use ansi-term mode in Emacs, and run a program such as cat, ^D does not end the input like it normally does. If fact, it doesn't seem to do anything at all.
^C still works.
I have Evil installed
                        
                            
                        
                        
                            On
                            
                            
                                                    
                    
                ansi-term has two different input submodes.  To send a literal C-d in the default (character) mode, just press C-d.  However, if you are in line mode, you need C-c C-d.  Or you can switch to character mode with C-c C-k (and back to line mode with C-c C-j).
See also the documentation.
Try adding these to your config (after you load evil):
On my emacs with this modification,
catfollowed by^Din ansi-term char-mode ends the input and bring me back to the prompt. Make sure you know the difference between char-mode and line-mode like tripleee mentioned!