In general there is nothing wrong with ventilating thusly. My only concern is that many solar
vents don't do well with green water
over them, and many boats get the forward bits of the deck
inundated regularly... don't know about yours.
So, if your anchor
locker is open into the main part of the hull
as is implied in your description, you risk getting water
down there if the vent leaks
May not be a realistic worry in your case, but something to think about.