Snappie's answer includes the fundamental piece of information to your specific situation - the answer to your question entirely depends on the reason why those players didn't initially put that effort into the character. Whatever the reasons may be, I agree that you shouldn't force anyone to adjust to your personal feel of how the game should be played. Instead, there's a few ways of taking a softer approach to the problem:
Helping in the character creating process, and providing a friendly environment
In case of players not wanting to spend effort into building their character, having a character creator that automates the building process and minimizes or even excludes errors in the creation can be very helpful, especially for players new to a certain system. In the same spirit, offering help with character creation is among the best things you can provide (safe for an easy-to-use, yet complete character creator - something I have yet to see).
Playing D&D doesn't come as easy to everyone as it does to the most experienced players in the party, so making sure everyone is able to play their character or understands the game as perfectly as needed is one of the better services you can provide as a fellow player. In case everyone's familiar with the game and their character, you can still make sure everyone gets their fifteen minutes of fame (so to speak) in order for them to enjoy themselves (which includes not stealing their show). If not being too much into the game being the reason that they don't put a lot of effort into the character creation process, trying to make the gaming experience better for them is the best way I can see to try to get them to put more effort into it.
Not every character is created equal
Adjusting your own character to bring everyone to the same level works great and is easy, but if you don't want to do that (which I would see as a given if you spent a long time working out each and every detail), there are other ways in which you can balance characters of different power levels.
To name an example - I currently find myself in a party of experienced players, which however are not overly dedicated to character creation, and I'm playing a Barbarian with a power level that can one-shot not only about every enemy on our difficulty grade, but also survive a great amount of hits due to a lot of hit points and immunities to lots of types of magic. While playing, that doesn't pose as too much of a problem, though, as I'm playing the character as a holding-back fighter that only competes with opponents seemingly worth fighting against, and otherwise work together with the DM to build a story rather than participating "only" as a player character.
This works out nicely for everyone in my group (at least from what I've seen), but whether it's applicable at all for you and your adventure, and whether that's something you want, is an entirely different story.
For my group, this didn't only fix the problem of different power levels, but also created a lot more depth in the story, as opposed to the simple "go to X and beat Y" formula.
Adjust the adventure
Of course, there's also the possibility that those charaters are stronger than they appear, due to certain specialities they have, maybe don't know how to use. Whether those skills matter, however, depends entirely on the structure of the adventure - for example, a Rogue won't be disarming any traps if the DM doesn't include a great many in their adventure.
Your DM can adjust the usefulness of the seemingly lower-powered characters by shifting the difficulty of the adventure from mainly combat-focussed to having to solve other elements. This isn't limited to traps, as it can mean diplomatic endeavors, craftsmanship tests, and of course the ability to solve puzzles, which always challenges the player and not their character.
Reward your players
This applies regardless of what the reason for your question may be, as everyone has different wants and goals playing D&D or other pen-and-paper games: Every player wants to get something out of the game, and if you or your DM manages to figure that out, incorporates it into the adventure and satisfies the player's expectations, you don't need to worry about other players having characters which are considered stronger. If the player wants to be the #1 monster slayer in the known world, this can be a hard task to achieve, but many players are looking for other tasks - playng a personality they feel like exporing, providing help for the rest of the party in time of need, or simply spending time with friends and playing a fun game. This may sound obvious to some, but then it's harder to see from a point of view that's very focussed on building (or even breaking) a strong character. I say that from experience.