Embedded Programming for Beginners: Arduino or Raspberry Pi?
If you really want "to understand how computers work on the low level", then it could be argued that neither Arduino nor Raspberry Pi are suitable. Both of these platforms (their hardware and software) are designed specifically to hide the low-level details in order to make it easy for people who don't care about those details to accomplish their higher-level goals by creating embedded applications.

Instead, I would recommend picking a CPU family that has a relatively "clean" instruction set architecture, and learning how to program it in assembly language. For example, I did a lot of my early coding on a PDP-11 minicomputer, which has (well, had) a very clean 16-bit architecture. I'm told that the TI MSP430 family is very similar. On modern 8-bit families, it could be argued that AVR is a bit cleaner than PIC. Or you could go old-school and look at the M68K or even the Z80.

So, it really depends on what your goals actually are: Do you want to create embedded applications, or do you want to study the processors themselves?

If you want to start with the former and then shift more to the latter later, maybe you should start with Arduino now, and then migrate to programming the underlying AVR processor at a lower level later.

I make this recommendation partly because of the simple nature of the application you suggested, and partly because of the migration path. It's much more difficult to migrate to low-level programming on the Pi. It's based on a complex SoC that requires quite a bit of software "infrastructure" just to get it going. With the AVR, you can easily program right down to the "bare metal" if you're so inclined.