For example, would you say. "We'd would like to have you over for a spaghetti/steak/chicken dinner" or do you just say "We'd like to have you over for dinner"?

I usually just let me guests know if it will be a "simple supper" if I am serving what you listed... I usually don't tell them what I'm serving.
They always get it.
Years ago it seemed fashionable to mention the food being served in the invitation and I think it helps people with food restrictions and it also helps w/ too many people putting their 2 cents in on the menu. They know upfront it's steak/tacos (whatever) and they're less likely to challenge it.

The latter. I can't be arsed about telling them beforehand what they're gonna eat. But I make it a point to find out about their special dietary requirement, if any. Which is why I never invite anything with -an or -ian trailing behind their arses.
That's the problem SP.....the minute you start w/ the whole "dietary requirement" thing it never ends.....this one doesn't do dairy, that one doesn't eat shellfish, the other one has a peanut allergy.
It's much easier to say 'I'm making Thai peanut beef stir-fry Saturday, would you like to join me?"

Are you saying you send written invitations to have people around for dinner? Email I suppose is ok.
No I wouldn't tell them what I am serving, because chances are I don't even know until the day before. But I would ask if there is anything they won't eat.
No, I'd just say "Hey Zoe, I want to have you over for a chicken dinner Friday night, can you make it?"