The agreement will see them work together on 46 policies.
Others include expanding free childcare for two-year-olds, a cap on second and holiday home numbers, reforming council tax, and free social care.
First Minister Mark Drakeford said it was "ambitious" and Plaid leader Adam Price called it "historic".
More than 87,000 pupils in Wales aged five to 15 are currently eligible for free school meals, but under the promise from the parties, this would be expanded to all children aged between four and 11.
This figure for children receiving free school meals is the highest since records began in 2003/04.
Parents of children in some deprived areas can already qualify for 12.5 hours free childcare for two-year-olds through the Welsh government's Flying Start programme. Monday's announcement effectively extends that to everyone.
Three and four-year-olds are offered 30 hours free care, if their parents are in work or training.
Mother-of-five Leanne White did not qualify for free childcare because of where she lives.
"I can't get that because of my postcode," she said. "Literally down the road, footsteps down the road, they can.
"I don't see how you can differ between each child - and that's gone on for years."
She added: "I would love it.
"I think that's the age they need to be integrated with other children, going into nursery, mixing with other kids if they don't have a chance to."
Natalie Johnson, whose son Franklin is 18 months old, called the news "fantastic".
She added: "I feel like he's ready to go to childcare but I can't find anyone that can be there for him or help him."
Adam Price and Mark Drakeford have struck the deal for three years
The parties agreed the deal six months after the Senedd elections, in which Labour once again became the largest party, but fell short of an overall majority.
Welsh Labour won 30 of the 60 seats, while Plaid was the third largest party, with 13.
The deal still needs to be ratified by Plaid Cymru members at the party's virtual conference at the weekend, but it is expected to be passed.
Speaking at a press conference after the deal was announced, Mr Drakeford said the policies the parties would work together on "range from extending free school meals to all primary school pupils, to finding long-term solutions to the problems caused by, for example, too many second homes in some communities, and ensuring that we all have good social care when we need it".
Mr Price said the deal involved "free school meals for all, starting with primary aged pupils, a national care service free at the point of need, free childcare for all two-year-olds, an end to homelessness, a white paper on rent control and a right to adequate housing".
The parties will also aim for net-zero carbon emissions in Wales by 2035, as well as working with farmers to improve water and air quality.
Other policy proposals include creating a publicly-owned energy company for Wales, plans for further flood defences and new measures to strengthen the Welsh language, create more support for young people's mental health and to increase the number of members in the Senedd.
Mr Drakeford said: "It is a sign of the maturity of Welsh politics, also a sign of our ability to innovate and create solutions that work for us here in Wales."
Mr Price added: "Policy is more important to us than position. We believe the purpose of politics is to make a big difference.
"We don't believe one party has the monopoly on truth, virtue or good ideas."
The Welsh Conservatives, the second largest party in the Senedd after Welsh Labour, criticised the agreement, saying it did not deliver for working families and would cause "constitutional chaos".