Can I run a wire from a light switch to a new bathroom fan without needing a licensed electrician to pass the inspection?
No, you would need to be licensed. Unless your building department is weird.
Can I move a 1/2” copper water line back 3” to fit a new shower or does a licensed plumber have to do it?
No, you would need to be licensed. Unless your building department is weird.
If these tasks and similar ones like it require other licensed specialists to perform them, how can I stay competitive in my estimate when I have to pay premiums for minor repair work?
Two options:
(1) You decide if you want to be the cheap guy and try not to get caught. It's a method, but it will trap you at the bottom because you will mainly get the cheapskates as customers and won't be able to afford to do really high quality work. You will have to outcompete the lowest common denominator, and it is hard to do that ethically. You will be working harder for less money.
(2) You unapologetically charge more and tell your clients up front that you will cost more because you are a high-end contractor, do everything on the up-and-up, and you take pride in your work. Tell them that they will get what they pay for. You don't stop talking then, you then tell them that they can go with some unlicensed good-ole-boy, but it will probably end up costing more to get a good product when they need to hire someone else to come in later to clean up the mess. Have inexpensive contractors you can recommend in a "they aren't great but they're cheap" kinda way.
A tactic that can be effective is to take the time out while you have them on the phone to warn potential customers about contractors getting paid before they finish and bailing on the project, and warning them about contractors working without a permit, getting caught, and bailing the project to avoid enforcement, leaving the owner to have to hire someone to tear out the stuff that is wrong and re-do it or face enforcement from the AHJ. Being nice enough to look out for people who may not hire you will make a good impression, and if the guy they do hire takes them for a ride, they will remember you next time they want to hire someone.
Can I still do the work myself and have an electrician or plumber sign off on it for a fee?
It's not strictly legal, but no one can stop you. License sharers rarely check things thoroughly enough to catch issues, and that makes a mockery of the reason licenses are required. I will note that it is much safer to do this on plumbing, unless a torch is involved. With electrical, if the house burns down for something totally unrelated to what you did, you are not unlikely to still be blamed because juries and many fire investigators don't understand electricity - it may not even be an electrical fire to begin with. With electrical, it's not about who is right, it's about who can demonstrate having the most certifications and having more convincing expert witnesses to back you up.