Lots of things to consider. Luckily you have a decent amount of time!
Some questions to consider:
How long do you want to spend in the three places you've already outlined? For kiddo's first trip I would suggest a minimum of five days in London, if not a week, for potential day trips. I can't speak to the other places because I haven't visited them yet.
Will you be renting a car? Public transit? London and Cardiff are geographically situated in such a way that you could add a stop like Bath, Oxford, the Cotswolds, or another southern England stop, if you were driving. Edinborough is much further north. Maybe consider open jaw, flying into one city and out of the other.
And of course, what are everyone's interests? If kiddo is into King Arthur, a place like Glastonbury could be cool. Literature? Bath and Oxford! And if nature/outdoorsy stuff is the thing, there are no shortages of great hikes doable by everyone across the country, just depends on your transport options (I've heard great things about hiking in the Wye Valley in Wales, and I'm super bummed I can't fit it into my upcoming trip!)
Exciting times-good luck planning!