Moss is just fine in your compost! Moss is one of the great opportunists in the plant world. Moss is not hurting your lawn. The presence of moss is telling us your lawn is not vigorous enough, you are watering too often and too shallowly, you are probably mowing too short and you've possibly got shade involved.
The cool thing about moss is that if there is bare soil moss will be able to grow and cover that bare soil. Moss is unable to grow without plenty of moisture, will not out compete or harm your grasses, thrives in shade and cool temperatures.
There is moss killer, a copper sulfate you can use but you will be right back to bare soil. Glyphosate is overkill and forget reseeding for 3 weeks. What you've already done, raking it out is perfect first step. Go ahead and put it in your compost, gees, this is a wonderful plant and moss spores are everywhere all the time. I'm betting you live in the Pacific Northwest? Yes?
Your main focus should be figuring out why your lawn is wimpy and dying out to cause bare ground. Here are some of the proper maintenance practices to enhance the vigor of your lawn grasses;
1) Do not water every day. Water deeply and then do not water again until you see your footprints after walking on your lawn. When the grass doesn't spring back up after stepping on it, that is the sign to water again and deeply. Allow to dry until you see your footprints again, no sooner. This trains your grass to grow deep roots which cool season grasses are genetically designed to have. These genetically deep root systems need sufficient top growth of photosynthetic material with which to make their food and to support those roots.
2) Mow no shorter than 3". I am serious. Not 2 1/2 but 3 full inches! When the grass is cut this way you end up taking off less each time you mow (once per week minimum). Bag and compost. I've never found a mower that is able to really chop the blades of grass fine enough. Great stuff for compost. Not so much for your lawn. I'd rather fertilize correctly than deal with thatch.
3) You need a soil test. Your soil is probably acidic, duh, Pacific Northwest! Copper Sulfate will kill the moss but it will also lower the pH of your soil even more. Grass needs a more neutral pH. Do not lime without a test. This is the only way to know how much lime to apply to your lawn as well as the amounts of necessary chemicals grass needs. Otherwise, you the dude in control will be blindly managing your lawn. At least one test; guess they are about $15 now at your closest cooperative extension service. In Washington that would be WSU.
4) Fertilizer should be higher in N than the P and the K, in terms of percentage. Fast release in my experience is not that healthy for your crop of grasses. There are amazing slow release, organic fertilizers that also have important microchemicals and beneficial thatch eating bacteria. Traditional Scotts/Ortho synthetics are applied 4X per year. Each has a different formulation for spring, early summer, late summer and then fall. Important to follow. The slow release you won't need to do but 2 or maybe 3X. I have to tell you with decades of caring for lawns on a commercial basis (Seattle WA area) it is worth every extra penny offset by having to fertilize less often. I was so impressed by these 'organic' fertilizers I actually PUSH these products. The one I used was Dr. Earth Lawn Fertilizer. Seriously amazing the difference in health of lawns.
5) Aerate once per year with a core aerator easily rented and costs shared with your neighbors. It is fast and simple and takes little of your energy to get 'er done. Leave the cores right where they fall!
6) Get an extra set or two of blades for your mower. You want brutally sharp blades! If your mower is unable to be raised high enough to cut no shorter than 3 inches, your shop should be able to customize the height adjustments. Get to know these guys! Stick around if you are able to learn how to maintain your mower. Learn how to change out air and gas filters.
7) If you are trying to grow grass in shade you will have to reduce fertilizer of that shaded grass by half. Too much fertilizer on grass not getting enough light will put undue stress and weaken grass in the shade. You might consider getting rid of grass in the shade by making a graveled park look instead of having to keep fighting growing grass where it will never be happy or having to manage part of your lawn one way for sun and another for shade.
Just by changing your maintenance habits you will not have to 'worry' about moss or weeds or any other chemical applications. Moss is green and you have to get close to see it is moss not grass. Moss is just telling you your lawn is not happy and management practices need to change to promote grass, not moss.