You can write a game engine in practically any language using practically any methods of rendering. You could write a game engine in bash using console output for example.
So, I think it would be best to define what exactly you want to learn in writing your own engine. There are a lot of "fields" in game development.
etc.. From there you can even have sub topics. In Rendering/Graphics
2d or 3d ?
Just one of those sub-sub-topics could eat up many hours (or years!) of study!
So, first define what you want to learn. Start simple.
Use whatever language you are comfortable with - though some are better suited for certain tasks. For example, the core engine and rendering is probably best done with a "lower" level language like C/C++ (if you need performance that is); but something like AI or Game Rules might be better done in a higher level language. Nothing says you can't mix and match. You could write your engine in C++, your rendering in C (since it works well with OpenGL) and then use LUA for scripting your Game Rules, etc.
As far as example, there is a game engine called Slick2D. It's written in Java and is open source. It's an example of a simple 2d engine written and designed really well. You can learn basic concepts from that, like game loops, managing game states, etc.
If your comfortable with C/C++; I would suggest taking a look at SDL/OpenGL. It handles some of the housekeeping like input, sound, creating windows, etc and can focus on other stuff.