That's going to be an interesting one because it depends on the make and model of device you're talking about. But either way, you're looking at a fair bit of legwork in comparatively uncharted waters.
For older iDevices,
you might want to check out the work being done by Open iBoot. IT's a piece of software that focuses on being able to override the device's normal boot behavior in order to load unsigned third party code, and they've used it to
successfully boot android, but you'd have to talk to the people involved to get an idea of exactly what their latest work will boot on and how you might be able to use it to launch your own code instead of a linux kernel.
For Android devices, it's also going to be a mixed bag depending on how well the manufacturer locked down rooting for that particular device. If there's no known way to root, you're SOL. Otherwise, if you have a device you can root it should be as easy as flashing your custom-made ROM to your device in the same way as you would flash a new stock android image or something like cyanogen. Apparently,
it's possible to get ubuntu flashed and running on some devices, so you might want to look into their tablet distro code to see if you cant find arch code for your intended platform that could give you a blueprint on how to make your ROM start up properly.
Either way, though, the bottom line is that once you can figure out how to execute your own code at boot time, your big challenge is going to really lie in the fact that these aren't exactly open platforms with great hardware documentation to go off of. It's probably a bit easier for iDevices since they're very standardized and there are clearly people working on reverse engineering them that might have valuable info and/or there might even be some small amount of iDevice related code to go off of in Darwin, if they're even still distributing that code (afaik you can still get the latest Darwin in source form).
For Android devices, though, it's going to be a completely mixed bag depending on what you have. For the most part, there's really no hardware standard besides the list of supported processors/SoCs and then the vendor writes the needed device drivers themselves for whatever they've built, so you have to deal with finding out whatever it is that the manufacturer built into the one random device you're working with, and god help you on finding out those specifics for that specific tablet.
If, on the other hand, you literally just want to play with writing for a tablet and you don't have a particular device that you already own that you want to hack on, I think your best-bet route would be getting one of these
Ubuntu tablets and having a crack at that. Since it's a directly supported target of this major linux distro, you should be able to pull down Ubuntu's code to see exactly how they drive the device and use that to inform your own work.
That last one actually strikes me as a surprisingly not-unrealistic direction, and I hope you try it out, make some progress, and have a lot of fun with it. But that said, be forewarned that even then you're talking about digging through millions of lines of poorly documented C to glean your information, so it's not like it's going to be easy and it's not like there's going to be a series of tutorials or a book to hold your hand. But if you get something decent going, it'll be pretty impressive!