Before you do anything, you must figure out where it goes. It really has to vent outside. If it vents into the attic, you are going to have serious issues, including the potential of mold and rot as the hot, moist air is vented into an unconditioned space. It is (usually) against building codes to vent into the attic for this reason.
If it is venting through a roof or soffit vent, or out a wall, you're probably okay. It's best to keep runs as short as possible and with as few bends as possible. Dryer lint building up in the pipe can pose a fire hazard, so the shorter and straighter it is, the less chance there is to have anything build up, and the easier it is to clean out if needed.
Assuming it's vented properly, then I think boxing it in with drywall is a great way to go, and in fact is exactly what I did (in the corner):
You should also consider an in-line lint trap (I probably would have put one in if I knew about them):
I'd also recommend using straight vent pipe where possible, as it is smooth inside which reduces the opportunity for lint to attach and block the pipe. The rigid stuff you have is alright (way better than the white plastic crap) but it is still ridged inside.
I'd use a few pieces of wood up in the ceiling, to have something for screwing the vent to. The plaster is getting a little worn-out there. I wouldn't trust anchors or make anymore holes for them, nor use toggle bolts; that plaster is about to go and you're about to run out of room (hide-able hole). -I just really don't like wall hangers and I wouldn't want to be pounding some in at that location. It's also not going to be the easiest thing to line up all 3 holes' anchors.
You may get lucky and rotate it just right to find something to bite (don't rip the duct) or just get some shims up there and be done with it. If you do rotate it and find undisturbed plaster to screw to, use drywall screws and not the silver ones you probably have from the vent (larger thread; better grab -do not over tighten them).
Judging by the number of holes, this is the fourth time it's come down; shim it.
Best Answer
Yes, any spackle will fix that. Carefully check the metal vent box and you should find some screw holes for the vent. From the picture it looks like there might be a double drywall installation and the screws don't reach into the metal vent box. If that's the case, get some longer screws from your home store.