"Created them flawless/flawlessly"

Solution 1:

Both are correct, but they mean different things. "He created them flawless" means that the creations were without a flaw, and "he created them flawlessly" means the act of creating them was performed without flaws.

Solution 2:

"Flawless" is an adjective which must modify a noun, and "flawlessly" is an adverb which must modify the verb. So in the sentences you gave:

He created them flawless

Here "flawless" modifies "them", as in, they were flawless after he created them.

He created them flawlessly

Here "flawlessly" can only modify "created", so the act of creation was flawless.

It's a matter of definition whether a flawless act of creation results in a flawless created object.