The Daily Star wrote an article about this, in which they interviewed Mendes before the film was released:
Sam Mendes, 49, hinted that the spy icon, played by Daniel Craig, 46,
would face a decision in his next film about whether to continue his
glittering career.
Sam explained: “That’s what the movie is about - whether or not to
pursue the life he’s always pursued, whether he matters and is he
going to continue or not.
“You’ll have to come see the movie to find out whether he does.”
In the film's final scene, it's certainly suggested he has gone:
Q: Bond? What are you doing here?
Bond: Good morning, Q.
Q: I thought you'd gone.
Bond: I have. There's just one thing I need.
However, I'd suggest this scene was more of a nod towards the potential departures of both Mendes as director and Craig as Bond:
“There is a sense of completeness that wasn’t there at the end of
Skyfall,” said Mendes, “and that’s what makes this feel different. It
feels like there’s a rightness to it, that I have finished a journey.”
The director was quick to exclude the film’s star in his decision,
however. “I’m not talking about Daniel here,” he continued, “because
Daniel may absolutely turn around six months’ time [sic] and feel his
energy renewed. Or he might say just the opposite.”
Of course, without knowing the script for the next film, maybe he truly is retired. But as it's a colossal, world famous, high grossing film series, it will not be discontinued. And it's hard to imagine how they will continue it without Bond being a 00 agent, as that's his entire identity (imagine Spiderman without the suit and powers, Harry Potter without the magic).
Instead, they'll likely either forget this scene or else create an excuse to bring Bond back to the service.