after placing plastic bag over grass to kill it, can I leave bags down, put compost on top, then plant flowers or seeds in the compost?
You could, but it would eventually become kind of a mess. The plastic bags will break apart over time, and the compost will break down, so in a few years time you'll likely have shredded plastic bag sticking up through the soil. It isn't a look most people are going for.
If you want something that will kill the grass and that you can keep in place, I'd suggest going with a thick layer of newspaper or cardboard. You can then cover it with compost and/or mulch and plant the bed. By the time the cardboard/newspaper breaks down, the grass underneath should be dead. I've done this in multiple beds and it works great.
The less water permeable you barrier is the more reluctant I'd be to leave it in place for any amount of time. Even with the cardboard, I know some people have good success. I'd still worry about it, because it's forming a barrier between the roots and any water that comes from above. That becomes less of an issue as it breaks down, but then it's not doing what you want in the first place.
Plastic bags would do this more so. The water would be able to run around them more readily, because they cover a smaller area, but they're completely impermeable to anything that lands on top of them. I'd consider using a grass killer and spot treating. I even saw a recent commercial for one brand that has a long sprayer stem and a little bell over the end so you can target your spray. Let that die off and had pull what's right up against your flowers.