Very easy indeed, especially if you're not concerned with 100% compatibility with existing MS-DOS API. It's closer to a library of routines that serve as a thin layer on top of the BIOS that just provides a filesystem and program loader. No (preemptive) multitasking (although TSRs are still possible), dynamic linking, virtual memory, etc.
It's easy now because plenty of documentation exists of how to do it and there are plenty of open source examples, and there widely available, inexpensive or free, easy-to-use development environments and emulators and debuggers.
The original DOS boot sector was also a "filesystem and program loader", albeit one that wasn't able to do much other than find IO.SYS, load it, and run it.
There's also the fact that a modern emulator (assuming you're running as an emulator, instead of real/raw) is that you aren't constrained by memory the way real hardware implementations were either.
I keep thinking it would be cool to emulate enough of DOS and earlier x86 to just run BBS Doors directly and connections over ws(s) to make authentication and program selection a bit easier. Even if no classic BBS terminals (currently) support connecting over WebSockets, which are easy enough to bridge.
What I wanted to do is make a "DOS" that's actually just a bootloader for a UNIX-like OS, but it's actually structured and works like DOS, just for launching kernels and minimal file management.
I think the real hard thing would be writing a full BIOS for an 8086 from scratch, capable of running a real DOS. I also wanted to do that, but...
There were loadlin and grub4dos back in the day. A more recent development is doslinux (https://github.com/lpsantil/doslinux) but it is far less complete. But more hackable if you just want to see something work.
If you want nothing more than a filesystem and program loader, you can fit everything in 512 bytes: https://news.ycombinator.com/item?id=20569438