Well there are a couple ways of thinking about this. One is to list the specific features the engine should have (what you've asked here.) However the other way is to just start making games without worrying too much about the "engine", and then features you find are being reused between multiple games (in particular, features used in every game) you should migrate from the source for a specific game into a shared codebase called "engine."
Because in the end, why you want a given feature in the engine rather than in the game is that it's shared between multiple games. Typically that'll be things like drawing commands, input controllers, and networking code. A 2D game engine will have lots of 2D graphics features, like loading images, a display hierarchy with z-order, handling spritesheets, tweening, etc. A lot of games need physics simulation, although on the other hand many don't. Meanwhile more "under the hood" stuff used in almost every game includes timers, event messaging, and even math functions specific to game development (eg. distanceToTarget()
Long story short:
A) The engine should have features shared by most games.
B) You learn which features are shared by making a bunch of games.