How should I handle my 4-year-old middle child, who demands all my attention?
This sounds frustrating, not just for you and your husband but for all your children as well. It's normal for a preschooler to do all of the things you're describing. Most of the problems will go away with time. Meanwhile, there are a few things you can do.
Spend some extra time each day with your middle child. This should be time when you're completely hers and won't be distracted by anything else. (This is a good idea for each of your children but is especially important for the middle one right now.)
Also, whenever possible, ignore her behaviors that you don't like and pay extra attention to her behaviors that you do like. In other words, catch her being good instead of being bad. This will help learn that she can get more attention from you for being good than for misbehaving.