NOT another Arduino vs. Raspberry Pi question
Since you really want to learn the low level details, don't get ready-made systems which are intended in part to obscure those details.

Start by getting a bare microcontroller and wiring it up on a breadboard.  I think one of the 16 bit PICs (24, 30, or 33 series) in a 28 pin package is a good start.  Program it in assembler, not in C.  Compilers are again intended to hide the low level details you want to learn about.  You will also need some sort of programmer/debugger.  The PicKit3 is probably the best current choice for this.  With the PicKit3 between the micro and your PC, you can single step at the source code level in the free IDE called MPLAB.

Just getting the chip up and running at a known instruction rate will take more digging and learning that you probably realize.  Once you have that, you can write a loop to toggle a output pin, and watch it on the scope.  If you did everything right, it will oscillate at the predicted frequency.

After that, try using a timer to set up a periodic interrupt every 1/2 second in which to toggle the state of a output line.  Have that line drive a LED and see that it is actually blinking at 1 Hz.  Starting from scratch, this is not as easy as it may sound.

After that, things will become easier.  Now try your first real project.  What that is depends on what you want to build.